修复了切换游戏的时候播放背景音乐的问题

This commit is contained in:
fengshuo
2022-05-12 20:25:46 +08:00
parent 39c72ced8a
commit 00cf024636
3 changed files with 8 additions and 13 deletions

View File

@@ -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;

View File

@@ -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;

View File

@@ -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 {