iOS System Volume Control
Asked Answered
A

1

1

AudioServicesPlaySystemSound() is playing my sounds using ringer volume.

I want them to play according to system volume instead.

How to?

Augsburg answered 1/12, 2010 at 20:21 Comment(0)
P
1

You should use the AVFoundation Framework to play your sounds. Look into the AVAudioPlayer class.

Piccolo answered 1/12, 2010 at 20:29 Comment(7)
That consumes a lot of memory. No way.Augsburg
@GSchv - Really? Apple recommended it at the WWDC10. Oh well, I tried.Piccolo
@Piccolo - I play several sounds simultaneously. My game is very very popular. I'd need to create like 5 AVAudioPlayer objects, which would make my game lag. Any suggestions?Augsburg
Create the sound player objects ahead of time (in your delegate perhaps) and pass them to the view when necessary?Piccolo
I was thinking Audio Queues. Do you know anything about Audio Queues?Augsburg
@GSchv - Nope, sorry. I imagine the concept is similar though. If you find out about them, let me know. (starred)Piccolo
Use OpenAL. There's a nice example / useable sound engine here: 71squared.com/2010/01/latest-sound-manager-classAccommodating

© 2022 - 2024 — McMap. All rights reserved.