簡體   English   中英

是否可以增加系統聲音的音量?

[英]Is it possible to increase audio volume on system sound?

我正在為iPad申請鋼琴。 我正在使用AudioServicesPlaySystemSound (toneSSID)播放按鍵聲音。 但也有增加音量的功能。 但是我找不到如何增加聲音。 有誰能夠幫助我?

謝謝。

添加AudioStreamer.h文件

將此方法添加到AudioStreamer.m

- (void)setVolume:(float)Level
{

OSStatus errorMsg = AudioQueueSetParameter(audioQueue, kAudioQueueParam_Volume, Level);

if (errorMsg) {
    NSLog(@"AudioQueueSetParameter returned %d when setting the volume.", errorMsg);
}

}

並將其處理為audiostreamclass對象,例如

AudioStreamer * Obj = [AudioStreamer alloc] init];

[obj setVolume:1.0];

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM