Problems playing audio on a G5
Problems playing audio on a G5
- Subject: Problems playing audio on a G5
- From: Dominic Mazzoni <email@hidden>
- Date: Fri, 30 Jan 2004 20:58:09 -0800
I'm having trouble getting audio output to work on a Power Mac G5.
The problem seems to be that by default the built-in audio device
is in digital mode - see these screenshots of the Audio MIDI
Setup application:
http://spaghetticode.org/G5/
When I query the stream format from a C program, here's what I get:
mFormatID = cac3
mFormatFlags = 0x1e
mChannelsPerFrame = 2
mBytesPerPacket = 6144
mFramesPerPacket = 1536
mBytesPerFrame = 0
mChannelsPerFrame = 2
mBitsPerChannel = 16
mReserved = 0
This appears to be some sort of compressed format.
What I would like is to be able to write to a stream in some sort
of Linear PCM mode.
However, setting the stream format using AudioDeviceSetProperty
with a selector of kAudioDevicePropertyStreamFormat fails! Even
if I use one of the stream formats that is returned as one of the
device's supported formats, it still fails.
I'm particularly surprised that it fails because iTunes appears
to (temporarily?) set the device into linear PCM mode, so I know
it must be possible from a userlevel application. Can anyone think
of anything I might be doing wrong?
I also tried to create an AudioConverter to go between floating-point
samples and cac3 and that also failed.
Depending on exactly how I make the call, I either get '!dat'
or '?fmt' as the error message, from either AudioDeviceSetProperty
or AudioConverterNew.
I'm stuck - anyone know what to try from here?
FYI, the code I'm working with is the CoreAudio port of PortAudio
(v18-patch from CVS), which seems to work on just about every
other Mac I've seen. See www.portaudio.com for details.
Thanks,
Dominic
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.