• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Resolved: Re: playing a pcm buffer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Resolved: Re: playing a pcm buffer


  • Subject: Resolved: Re: playing a pcm buffer
  • From: "Daniel Birns" <email@hidden>
  • Date: Thu, 12 Oct 2006 10:02:18 -0700

Fellow audiofiles,

I figured out how to do it mathematically, and it's so easy that it's not worth doing it any other way. It's also more portable since I don't have to figure out the API on any other platform.

--Daniel


From: "Daniel Birns" <email@hidden>
To: email@hidden
Subject: Re: playing a pcm buffer
Date: Wed, 11 Oct 2006 19:33:51 -0700

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...

Now I have 2 new questions:
1) Can I change the volume?
2) Can I play more than one sound simultaneously?

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: 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


_______________________________________________
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


  • Prev by Date: Re: AudioUnitAddRenderNotify and AudioUnitRender mDataByteSize
  • Next by Date: Re: playing a pcm buffer
  • Previous by thread: Re: InputCallback data request size
  • Next by thread: Subgraph connecting to Parent Graph nodes
  • Index(es):
    • Date
    • Thread