[Stk] Fwd: RtApiDummy: This class provides no functionality.

Stephen Sinclair sinclair at music.mcgill.ca
Fri Sep 12 19:04:36 PDT 2008


On Fri, Sep 12, 2008 at 4:54 PM, alpana jui <lpnjui at googlemail.com> wrote:
> Dear Steve,
>
> Thank you very much.
>
>  I tried to follow what you suggested but I am not sure if I followed
> this right.  I will appreciated any suggestions. I attached all the
> attempts so far  I made to  check if RtAudio configure my audio device
> in the XCode and in the terminal.  Unfortunately, still no success but
> RtDummy and in the terminal, some unexpected message as attached. But
> STK works in the terminal as expected but I will try this by setting
> the parameters in XCode to check if this can be used for my audio
> interface.
>
> In the terminal
>
>>>
> ./record 2 44100 3 1
>
> Recording for 3 seconds ... writing file 'record.raw' (buffer frames = 512).
>
>
>>>
> ./playraw 2 44100 record.raw 1
>
> RtApiCore::probeDeviceOpen: unable to find OS-X stream on device (1)
> for requested channels.
>
>
> RtApiCore::closeStream(): no open stream to close!

Okay so it looks like you are on the right track, as it is now able to
find audio devices and is clearly compiled against CoreAudio.  I don't
know why the playback didn't work but you might want to try specifying
device 0 instead of device 1.


>>> In the terminal
> ./audioprobe
>
> Compiled APIs:
>  OS-X Core Audio

[...skip...]


> The preprocessors I set in the XCode record.cpp and playraw.cpp tests
> are as follows:

okay, you cannot just set these in the cpp file.  They also have to be
seen by the headers and by rtaudio.cpp for example.  It is better to
put them in the project settings somewhere.  If you only put them in
these two files, the program will compile against rtaudio successfully
but rtaudio.cpp will only compile the Dummy device, as you have seen.

I'm not familiar enough with XCode to tell you where to put these, but
look for "preprocessor definitions" or "defines" somewhere in the
project settings.

> // __GXX__: OS X specific preprocessor
> #ifndef __GXX__
> #define __GXX__
> #endif
>
> // __MACOSX_CORE__: OS X specific preprocessor
> #ifndef __MACOSX_CORE__
> #define __MACOSX_CORE__
> #endif
>
> #ifndef __LITTLE_ENDIAN__
> #define --LITTLE_ENDIAN__
> #endif

Watch out for "--LITTLE_ENDIAN__" instead of "__LITTLE_ENDIAN__".
The "--" will get compiled as a C operator!


>    I do not know yet in XCode console where I can set the parameters
> for this variable.

Try looking up information in the XCode documentation about where to
put libraries and preprocessor defines.  You might want to ask in an
XCode forum instead of here.

Otherwise I'd say things are working okay for you, you just need to
specify the correct audio device.


> Thank you very much for the support,

no problem, I hope you can figure it out.

In my experience the use of IDEs like XCode don't actually make things
"easier" when it comes down to it, but to each his own.. :)


Steve



More information about the Stk mailing list