Re: UPDATE - Re: java coreaudio, missing methods
Re: UPDATE - Re: java coreaudio, missing methods
- Subject: Re: UPDATE - Re: java coreaudio, missing methods
- From: Wesley Miaw <email@hidden>
- Date: Wed, 3 Jul 2002 16:12:35 -0700
I guess I should indicate what stream descriptions I was using when
creating the AudioConverter for use with AudioConverterFillBuffer.
Source:
err = AudioDeviceGetPropertyInfo(inputDeviceID_, 0, true,
kAudioDevicePropertyStreamFormat, &propertySize, &writable);
if (err != noErr) throw Exception("AudioDeviceGetPropertyInfo:
AudioDevicePropertyStreamFormat");
err = AudioDeviceGetProperty(inputDeviceID_, 0, true,
kAudioDevicePropertyStreamFormat, &propertySize,
&inputStreamBasicDescription_);
if (err != noErr) throw Exception("AudioDeviceGetProperty:
AudioDevicePropertyStreamFormat");
Destination:
mashStreamBasicDescription_.mSampleRate = 8000.0;
mashStreamBasicDescription_.mFormatID = kAudioFormatLinearPCM;
mashStreamBasicDescription_.mFormatFlags =
kLinearPCMFormatFlagIsSignedInteger |
kLinearPCMFormatFlagIsBigEndian |
kLinearPCMFormatFlagIsPacked;
mashStreamBasicDescription_.mBytesPerPacket = 2;
mashStreamBasicDescription_.mFramesPerPacket = 1;
mashStreamBasicDescription_.mBytesPerFrame = 2;
mashStreamBasicDescription_.mChannelsPerFrame = 1;
mashStreamBasicDescription_.mBitsPerChannel = 16;
I've run conversions from as low a 4K up to 192K through our converters
and
not seen anything like the problems that someone else was reporting -
which
I would guess is a problem in configuring the stream descriptions to
accurately describe to the converter what your source and destination
formats are.
--
Wesley Miaw, Berkeley Multimedia Research Center
email@hidden
_______________________________________________
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.