mpmusicplayercontroller

Is it possible to use different volume levels for different players (AVAudio Player and MPMusicPlayer) while they are playing simultaneously?

不问归期 提交于 2019-12-11 00:13:22
问题 I need to set different volume levels for different players using AVAudio and MPMusic Players, I am playing both players but I do not know how to set different different volumes levels. Thank you, Madan Mohan 回答1: Say your avaudioplayer is named theAudio. To control that volume, say [theAudio.volume =//volume here]; Do the same for mpmusicplayercontroller. 来源: https://stackoverflow.com/questions/6409940/is-it-possible-to-use-different-volume-levels-for-different-players-avaudio-pla

Did MPMusicPlayerController change with iOS 5?

自闭症网瘾萝莉.ら 提交于 2019-12-10 15:52:47
问题 I had an app which worked correctly in iOS 4.3, after upgrading to iOS 5 it behaves in another way. After executing these lines on iOS 4.3 mp.playbackState is set to MPMusicPlaybackStatePaused, however in iOS 5 it is still set to MPMusicPlaybackStatePlaying. MPMusicPlayerController *mp = [MPMusicPlayerController applicationMusicPlayer]; if(mp.playbackState == MPMusicPlaybackStatePlaying) [mp pause]; I assume that playbackState is not updated within the same event loop, is it ok? 回答1: I think

MPMusicPlayerController and setNowPlayingItem

痴心易碎 提交于 2019-12-10 15:13:52
问题 I'm using MPMusicPlayerController , specifically with setNowPlayingItem protocol and it's for cydia . But I have some issues and theos' warning when i make. It seems that some of the protocols and methods are not working and I receive some warning like this: Tweak.xm:177: warning: ‘MPMusicPlayerController’ may not respond to ‘-skipToPreviousItem’ Tweak.xm:188: warning: ‘MPMusicPlayerController’ may not respond to ‘-pause’ Tweak.xm:193: warning: ‘MPMusicPlayerController’ may not respond to ‘

Problems with currentPlaybackTime and MPMusicPlayerController and iOS 7.1

一曲冷凌霜 提交于 2019-12-10 09:47:29
问题 Having problems setting currentPlaybackTime with MPMusicPlayerController in iOS 7.1. I used to be able to simply do the following: MPMusicPlayerController *iPodController = [MPMusicPlayerController applicationMusicPlayer]; iPodController.currentPlaybackTime = 30.0; [iPodController play]; And the music player would seek to 30 seconds in and play. As of iOS 7.1 this is not the case. If I do the following: [iPodController play]; iPodController.currentPlaybackTime = 30.0; Then it "may" jump 30

How can we control bass of music in iPhone sdk? [closed]

℡╲_俬逩灬. 提交于 2019-12-09 17:54:15
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . I want to control the bass of song played by user from iPod music library. I've searched on Google and got some AudioMixer samples which were of no help, but now I have got bass library i.e. libbass.a from http:/

beginReceivingRemoteControlEvents not triggering events for Apple Music

一笑奈何 提交于 2019-12-09 10:08:43
问题 I am playing Apple Music from my application , the apple music player code is as - -(void) submitAppleMusicTrackWithProductID: (NSString *) productID // productID in US is the last numbers after i= in the share URL from Apple Music { [SKCloudServiceController requestAuthorization:^(SKCloudServiceAuthorizationStatus status) { NSLog(@"status is %ld", (long)status); SKCloudServiceController *cloudServiceController; cloudServiceController = [[SKCloudServiceController alloc] init];

Setting iOS MPMusicPlayerController volume relative to AVAudioPlayer

纵然是瞬间 提交于 2019-12-08 04:35:51
问题 I have an app that plays background music using MPMusicPlayerController and foreground sounds using AVAudioPlayer. I want to control the relative volume so that MPMusicPlayerController is much lower, but setting the volumne changes the overall system volume as if using the buttons on the side of the phone. Is there way to lower the volumne of MPMusicPlayerController without lowering the system volume? MPMusicPlayerController *musicPlayer = [MPMusicPlayerController applicationMusicPlayer];

Different Volume settings for Different players

有些话、适合烂在心里 提交于 2019-12-08 04:02:30
问题 I am implementing a audio based application. In my application I need to play the songs from my internal iPod application and application sounds simultaniously. I used 2 players , one with avaudio and another one with MPMusicPlayer. But my problem is I need to input 2 different volume levels for these 2 different players. When I try to do it it is changing both players volume. Can you guys please help me on this? Thank you, Sekhar. 来源: https://stackoverflow.com/questions/6409278/different

Using MPMusicPlayerController, setting musicPlayer.currentPlaybackTime to seek but takes second to take effect

只谈情不闲聊 提交于 2019-12-06 06:13:33
问题 I have a UISlider acting as the scrubber. As the thumb is dragged I execute the following: - (void) _seekTo:(double)playbackTime { mPlayer.currentPlaybackTime = playbackTime; } That works fine, music seeks forward. Upon releasing the thumb, I restart the NSTimer to send time updates to keep the UISlider in synch. Problem is, upon releasing the thumb, the first few call backs contain the previous time value. This causes the thumb to jump back to its original position before returning to the

How to record video and play audio at the same time (swift tutorial)

喜你入骨 提交于 2019-12-06 05:57:37
问题 So you want to record a video and play music from the user's library at the same time ? Look no further. Below is the answer. 回答1: For the audio playback you will use AVAudioPlayer . All you have to do is to declare the AVAudioPlayer as a global variable (I named it audioPlayer ) and implement the code below. Use this in after the user chose the song he/she wants to play: func mediaPicker(mediaPicker: MPMediaPickerController, didPickMediaItems mediaItemCollection: MPMediaItemCollection) { let