[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sc-dev] Fwd: sc3 kAudioDevicePropertyStreamFormat hack

this was posted to the original SC list earlier. not sure if everyone on the CREATE lists are on it so i thought i would forward it.

the hack has fixed my problem with using the built in audio on a quicksilver dual/Ghz tower, and Jan claims that USB devices work as well.

the link is: http://www.sampleAndHold.org/software/osx/devels.html


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

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:


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:
(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:
then it can be set with daisy.
for some reason i could not compile the engine with sndlib.
so i uncomment the parts in:
	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 ?