Reputation: 885
I am making piano application for iPad. I am using AudioServicesPlaySystemSound
(toneSSID) for play sound of keys. But there also functionality to increase volume. But I not find how to increase sound. Can anybody help me?
Thanks.
Upvotes: 1
Views: 543
Reputation: 6427
Add AudioStreamer.h file
Add this method to AudioStreamer.m
- (void)setVolume:(float)Level
{
OSStatus errorMsg = AudioQueueSetParameter(audioQueue, kAudioQueueParam_Volume, Level);
if (errorMsg) {
NSLog(@"AudioQueueSetParameter returned %d when setting the volume.", errorMsg);
}
}
And handle this to audiostreamclass object like
AudioStreamer *Obj = [AudioStreamer alloc] init];
[obj setVolume:1.0];
Upvotes: 1