修复了切换游戏的时候播放背景音乐的问题
This commit is contained in:
@@ -83,8 +83,8 @@
|
||||
if (filePath) {
|
||||
self.MusicCompletion = completion;
|
||||
[self changePlayState:BackMusicPlayState_Stop];//切换歌曲need stop
|
||||
BOOL state = [self.engine startAudioMixing:filePath loopback:NO replace:NO cycle:1];
|
||||
return state;
|
||||
[self.engine startAudioMixing:filePath loopback:NO replace:NO cycle:1];
|
||||
return YES;
|
||||
} else {
|
||||
return NO;
|
||||
}
|
||||
@@ -110,7 +110,7 @@
|
||||
case BackMusicPlayState_Resume:
|
||||
{
|
||||
[self.engine resumeAudioMixing];
|
||||
isPlaying = NO;
|
||||
isPlaying = YES;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
|
@@ -114,8 +114,10 @@
|
||||
self.filePath = filePath;
|
||||
[self.engine muteAux:true];
|
||||
[self.mediaPlayer start:filePath repeat:NO];
|
||||
return YES;
|
||||
} else {
|
||||
return NO;
|
||||
}
|
||||
return YES;
|
||||
}
|
||||
|
||||
/// 改变播放器的状态
|
||||
@@ -139,7 +141,7 @@
|
||||
case BackMusicPlayState_Resume:
|
||||
{
|
||||
[self.mediaPlayer resume];
|
||||
isPlaying = NO;
|
||||
isPlaying = YES;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
|
@@ -332,16 +332,10 @@
|
||||
[self updateContrionEntranceWithRoomUid:[NSString stringWithFormat:@"%ld", roomInfo.uid] type:@"day"];
|
||||
}
|
||||
}
|
||||
|
||||
if (roomInfo.type == RoomType_MiniGame) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
[self updateRoomTopic];
|
||||
[self showLittleGameMiniView:roomInfo.type micCount:roomInfo.mgMicNum];
|
||||
[self configLittleGameState];
|
||||
[self configPlayMusicRoomTypeChange];
|
||||
}
|
||||
|
||||
- (void)onRoomEntered {
|
||||
@@ -407,7 +401,6 @@
|
||||
[self updateRoomTopic];
|
||||
[self showLittleGameMiniView:roomInfo.type micCount:roomInfo.mgMicNum];
|
||||
[self configLittleGameState];
|
||||
[self configPlayMusicRoomTypeChange];
|
||||
}
|
||||
|
||||
- (void)onRoomMiniEntered {
|
||||
|
Reference in New Issue
Block a user