X-Sieve: cmu-sieve 1.3
Date: Thu, 20 Jun 2002 17:19:49 +0200
Subject: sc3 kAudioDevicePropertyStreamFormat hack
Cc: asynth@xxxxxx
To: sc-users@xxxxxxxxxxxx
From: Jan Trutzschler <falkenst@xxxxxxxxx>
Sender: owner-sc-users@xxxxxxxxxxxx
Reply-To: sc-users@xxxxxxxxxxxx
hi
i compiled a sc server version that ignores the error
kAudioDevicePropertyStreamFormat of the input of the defaultoutputdevice.
it does work with my usb interface now.
if someone likes to try it out:
the server is here:
www.sampleAndHold.org/software/osx/devels.html
jan
usb audio error hack:
this is a short describtion of what i did to get sc3 running with my
usb audioInterface
that for some mysterious reason always returns this coreaudio error:
kAudioDevicePropertyStreamFormat
(that happens only with the input.)
so i just ignore this message and its ok (so far...)
havent tried input yet !
anyway it would be nice to get the input as a seperate device with:
kAudioHardwarePropertyDefaultInputDevice
then it can be set with daisy.
for some reason i could not compile the engine with sndlib.
so i uncomment the parts in:
SC_SequencedCommand.cpp
Stage2() ...
in how far is file i/o anyway supported?
and this is changed in SC_CoreAudio.cpp
// get a description of the data format used by the default device
count = sizeof(AudioStreamBasicDescription); // it is
required to pass the size of the data to be returned
err = AudioDeviceGetProperty(device, 0, true,
kAudioDevicePropertyStreamFormat, &count, &inputStreamDesc);
if (err != kAudioHardwareNoError) {
fprintf(stdout, "get kAudioDevicePropertyStreamFormat
[ignoring!!] error %ld \n", err);
//return false;
}
if (inputStreamDesc.mFormatID != kAudioFormatLinearPCM) {
fprintf(stdout, "mFormatID != kAudioFormatLinearPCM\n");
//return false;
}
if (!(inputStreamDesc.mFormatFlags & kLinearPCMFormatFlagIsFloat)) {
fprintf(stdout, "Sorry, currently only works with
float format....\n");
//return false;
}
ps: why is the engine now only 500 kb instead of 1.1 mb ?
jan