| 1 |
Michael Dickens |
|---|
| 2 |
2006-Apr-30 |
|---|
| 3 |
|
|---|
| 4 |
0) This module should compile and install in the same manner as the |
|---|
| 5 |
other GNURadio modules (e.g. gnuradio-core), with the possible |
|---|
| 6 |
exception that GNU libtool 1.5.20 or newer should be installed and |
|---|
| 7 |
used (if not first in the path) via "make LIBTOOL=/..." and so forth. |
|---|
| 8 |
Version 1.5.10 has failed making, and while picking version 1.5.20 is |
|---|
| 9 |
somewhat arbitrary, the newer version compiles and installs easily |
|---|
| 10 |
under OSX. |
|---|
| 11 |
|
|---|
| 12 |
1) This module should be automatically loaded by the Python command |
|---|
| 13 |
"from gr import audio". The audio import script will automatically |
|---|
| 14 |
select gr.audio_osx if it is available (though it will try to import |
|---|
| 15 |
ALSA first, then OSS, then OSX, and finally WINDOWS audio modules, in |
|---|
| 16 |
that order). If that import command doesn't work, try reinstalling |
|---|
| 17 |
gnuradio-core from scratch followed by gr-audio-osx. |
|---|
| 18 |
|
|---|
| 19 |
2) Instantiation arguments for either source or sink are: |
|---|
| 20 |
|
|---|
| 21 |
* sample_rate : integer : default == 44100 |
|---|
| 22 |
OSX converts the integer sample rate to a double internally; it |
|---|
| 23 |
would be nice to have this input as a double natively, but that |
|---|
| 24 |
doesn't work with other audio devices. |
|---|
| 25 |
|
|---|
| 26 |
* device_name : string : default == "2" |
|---|
| 27 |
For OSX, the device name should be an integer string. This value is |
|---|
| 28 |
the maximum number of channels to allocate (for input or output). |
|---|
| 29 |
In the "source" case (input), the actual number of channels will be |
|---|
| 30 |
whatever is available on that current system input device. In the |
|---|
| 31 |
"sink" case (output), OSX will convert the provided channels into |
|---|
| 32 |
whatever format is required by the current system output device. |
|---|
| 33 |
For example, "3" would try to setup for 3 input or output channels. |
|---|
| 34 |
NOTE that this is a very different use than that for other audio |
|---|
| 35 |
modules (though they can interpret the number of channels from this |
|---|
| 36 |
argument). |
|---|
| 37 |
|
|---|
| 38 |
* do_block : boolean : default == true |
|---|
| 39 |
If the data transfer buffer between OSX internals and GNURadio gets |
|---|
| 40 |
full, either block (true) or overwrite (false) depending on this |
|---|
| 41 |
variable. |
|---|
| 42 |
|
|---|
| 43 |
The following are currently non-standard arguments: |
|---|
| 44 |
|
|---|
| 45 |
* channel_config : integer : default == -1 |
|---|
| 46 |
An enum (internally) describing the channel configuration. Not |
|---|
| 47 |
currently used, but rather reserved for future expansion. |
|---|
| 48 |
|
|---|
| 49 |
* max_sample_count : integer : default == -1 |
|---|
| 50 |
The maximum number of samples to buffer between OSX internals and |
|---|
| 51 |
GNURadio. The value -1 is mapped to 1 second's worth of data. |
|---|
| 52 |
|
|---|
| 53 |
3) When the buffer is full and do_block is false and new data comes |
|---|
| 54 |
in, the oldest data will be overwritten. The source will print out |
|---|
| 55 |
"iX" each time this happens; the sink will print out "oX". |
|---|
| 56 |
|
|---|
| 57 |
4) In the "src" directory is a python script "test_audio_loop" which |
|---|
| 58 |
connects the default audio input device to the default audio output |
|---|
| 59 |
device. This script is very useful in testing that audio is correctly |
|---|
| 60 |
installed and both the source and sink are functional. This script is |
|---|
| 61 |
not run by "make check". |
|---|