// Get the recorder instanceTXUGCRecord *recorder = [TXUGCRecord shareInstance];// Set BGM file path[recorder setBGMAsset:path];// Set BGM using AVAsset loaded from the system media library[recorder setBGMAsset:asset];// Play BGM[recorder playBGMFromTime:beginTimetoTime:endTimewithBeginNotify:^(NSInteger errCode) {// Playback start callback. errCode 0: success, others: failure} withProgressNotify:^(NSInteger progressMS, NSInteger durationMS) {// progressMS: elapsed time (ms), durationMS: total duration (ms)} andCompleteNotify:^(NSInteger errCode) {// Playback complete callback. errCode 0: success, others: failure}];// Stop BGM playback[recorder stopBGM];// Pause BGM playback[recorder pauseBGM];// Resume BGM playback[recorder resumeBGM];// Set microphone volume (used during BGM mixing)// volume: 1.0 is normal volume. Recommended range: 0-2. Higher values allowed for amplification.[recorder setMicVolume:1.0];// Set BGM volume (used during BGM mixing)// volume: 1.0 is normal volume. Recommended range: 0-2. Higher values allowed for amplification.[recorder setBGMVolume:1.0];
Feedback