Re: playing a pcm buffer
Re: playing a pcm buffer
- Subject: Re: playing a pcm buffer
- From: William Stewart <email@hidden>
- Date: Thu, 12 Oct 2006 12:20:47 -0700
On 11/10/2006, at 7:33 PM, Daniel Birns wrote:
This is now working well. There was a problem I should point out
in the kit, which was almost certainly written before the intel
platform: The kit doesn't work right on Intel out of the box. You
have the remove the big-endian flag:
streamFormat |= kLinearPCMFormatFlagIsBigEndian
That got the demo to play correctly. Almost certainly someone has
noticed this already...
Ah - I'm not sure - if this is a bug in Apple code (I'm not sure what
you are referring to when you say "the kit"), could you please file a
bug. Details are at: http://bugreporter.apple.com
Now I have 2 new questions:
1) Can I change the volume?
On the output unit? Yes - there is a parameter to do this - see
<AudioUnit/AudioUnitParameters.h>
2) Can I play more than one sound simultaneously?
You need to mix them - there are several different mixers available -
if you are just doing stereo playback, then the stereo mixer is the
simplest.
You create an output unit, a stereo mixer, then your input callbacks
are attached to the inputs of the mixer
Bill
I know that I could do both of these things *mathematically*, by
altering the actual bits, but that's not what I'm looking for.
Thanks for your help. Without the guidance I got here, I might
have been lost for months.
--Daniel
From: Jeff Moore <email@hidden>
To: CoreAudio API <email@hidden>
Subject: Re: playing a pcm buffer
Date: Wed, 4 Oct 2006 18:04:50 -0700
There really isn't a mechanism on Mac OS X that works like you
are used to with wave out on Windows.
At any rate, for basic playback, you should check out the sample
code in /Developer/Examples/CoreAudio/SimpleSDK/DefaultOutputUnit
On Oct 4, 2006, at 5:53 PM, Daniel Birns wrote:
I need to play pcm buffers asynchronously.
I've spent way too much time looking for how to do this on my
own. I could use some help.
Our data will be 11k 8-bit mono.
On windows (for reference), we're doing this with
waveOutPrepareHeader() and waveOutWrite().
There's a callback we get when the buffer is played.
We need a similar mechanism for the mac.
--
Jeff Moore
Core Audio
Apple
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40hotmail.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
--
mailto:email@hidden
tel: +1 408 974 4056
________________________________________________________________________
__
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
________________________________________________________________________
__
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden