Sound using carbon
Hello all, I've been looking for some sample code on sounds for carbon OS X without any luck, any advise would be appreciated.
Thank you all.
Thank you all.
I found the old Sound Manager functions easiest to deal with - you should be able to find something using them somewhere in the Source Code section (where I learned from), or you could download the source to MAFFia (my uDG entry), which I know has it. It's 3.8 MB, mostly graphics I'm afraid, but sound.c should have most of what you need.
http://www.btinternet.com/~julianreade/maffcode.dmg.sit
http://www.btinternet.com/~julianreade/maffcode.dmg.sit
Thanks w_reade I have some sounds working!!I'm working on 3D game using Open GL, I wanted to have more control ever the sound, but for now your suggestion will do just fine.
Once I got something ready to show I'll post it here.
I wish Apple had an easier way to deal with sounds on 3D.
My pleasure, glad to help.
Oh yeah - If you're using OpenGL, how about OpenAL for the sound? I've never used it myself but I hear it has a similar interface to OpenGL, and may offer the control you're afterĂ– it might be just what you're looking for.
Oh yeah - If you're using OpenGL, how about OpenAL for the sound? I've never used it myself but I hear it has a similar interface to OpenGL, and may offer the control you're afterĂ– it might be just what you're looking for.
I have some code that shows how to pan using Sound Manager.
I'll take a look at OpenAL
Jabber is it possible to take a look at code or a demo?
Thanks again..
Jabber is it possible to take a look at code or a demo?
Thanks again..
Code:
#define kFullLeft -kFullVolume
#define kFullRight kFullVolume
OSStatus PanSpeakers(SndChannelPtr theChannel, short panPos)
{
short theVolumeLeft, theVolumeRight;
OSStatus err;
SndCommand theCmd;
theVolumeRight = kFullVolume + panPos;
theVolumeLeft = kFullVolume - panPos;
theCmd.param1 = 0;
theCmd.param2 = (long)((long)theVolumeRight << 16L | theVolumeLeft);
theCmd.cmd = volumeCmd;
err = SndDoImmediate(theChannel, &theCmd);
return err;
}
Thanks Jabber !
I really wanted to use OpenAL, but My project is carbon CFM and OpenAL is a framework.I looked at the sample code CallMachOFramework from Apple, but it only works with frameworks in the System/Library/frameworks not on Library/frameworks.
Should I change all my code to work with Mach-0
Any suggestions?
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Sound from disk in Carbon? | Fenris | 6 | 3,785 |
Feb 12, 2003 10:43 PM Last Post: Fenris |
|
| Sound library for Carbon | Muffinking | 2 | 3,032 |
Nov 14, 2002 12:52 PM Last Post: OneSadCookie |
|

