Register FAQ/Rules Forum Spy Search Today's Posts Mark Forums Read

Welcome to the Mac Forums forums. Please read the FAQ if you have questions. Register to participate.

 
Go Back   Mac Forums > Apple Software > Mac Programming
TouchArcade.com - iPhone Game Reviews and News

Reply
 
Thread Tools Search this Thread Display Modes
Old May 13, 2005, 01:02 PM   #1
dave.h
macrumors newbie
 
Join Date: Apr 2005
background music

what obj-c classes/libraries do I have to import and use to load/start/repeat../stop/unload background music in cocoa?

It's for a game. I'm just about to start searching developer.apple.com.. but sometimes that produces cryptic results.

I appreciate any response.

Thanks!
dave.h is offline   Reply With Quote
Old May 14, 2005, 07:50 PM   #2
dave.h
Thread Starter
macrumors newbie
 
Join Date: Apr 2005
hmm

okay, so this isn't the greatest programming forum. oh well, I figured it out.
dave.h is offline   Reply With Quote
Old May 16, 2005, 12:27 AM   #3
GeeYouEye
macrumors 68000
 
GeeYouEye's Avatar
 
Join Date: Dec 2001
Location: State of Denile
Send a message via AIM to GeeYouEye Send a message via Yahoo to GeeYouEye
I'm guessing you used QTKit if you're on Tiger, but if not, at least give us the solution for the archives.
__________________
I bring order to chaos. You are in chaos Windows, you are the contradiction, a bug wishing to be an OS.
Visit Softyards Software
NEW DEFINITION OF GEEK
Like politics, free speech, computers, entertainment, and more? Join us at Wordforge.net
GeeYouEye is offline   Reply With Quote
Old May 17, 2005, 05:13 PM   #4
dave.h
Thread Starter
macrumors newbie
 
Join Date: Apr 2005
NSSound

Actually, it's much simpler than that. I don't need a GUI or any advanced control for my sound output, so I just consider each background music "song" as an NSSound. It has responder methods for detecting when the sound stops (in my case, for repetition purposes). However, for the time being I'm still not clear on volume control (ie, separate from system volume, to allow different controls for audio / music.

And no, I'm not on tiger yet .

http://developer.apple.com/documenta...s/NSSound.html
dave.h is offline   Reply With Quote
Old May 19, 2005, 01:09 PM   #5
whooleytoo
macrumors 68040
 
whooleytoo's Avatar
 
Join Date: Aug 2002
Location: Cork, Ireland.
Send a message via AIM to whooleytoo
It may sound like a roundabout way of doing it, but you could use NSMovieView to play sounds. (Create a URL pointing to the sound file, use that to init an NSMovie, then use setMovie: to set that movie in the view.) The movie view can be offscreen or hidden.

You can then use setVolume without chaninging the system volume.
__________________
Greenpeace Apple
Mac <- Macintosh <- McIntosh apples <- John McIntosh <- McIntosh surname <- "Mac an toshach" <- "Son of the Chief"
whooleytoo is offline   Reply With Quote

Reply

Mac Forums > Apple Software > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 08:41 AM.

Mac News | Mac Rumors | iPhone Game Reviews | iPhone Apps

Powered by vBulletin® Version 3.6.10
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright 2002-2009, MacRumors.com, LLC