File tree Expand file tree Collapse file tree 1 file changed +0
-20
lines changed Expand file tree Collapse file tree 1 file changed +0
-20
lines changed Original file line number Diff line number Diff line change @@ -659,31 +659,11 @@ - (void) unloadAllEffects
659
659
return nil ;
660
660
}
661
661
662
- #if 0 // __CC_PLATFORM_ANDROID
663
- // TODO: we are creating a player and throwing it away each time, and not taking into account if it was preloaded.
664
- // think about checking for preload and implement the player's asyncPrepare finish listener
665
- AndroidAssetFileDescriptor *assetFd = [[[CCActivity currentActivity] assets] openFdWithFileName:filePath];
666
-
667
- if (assetFd.fileDescriptor && [assetFd.fileDescriptor valid]) {
668
- AndroidMediaPlayer *player = [[AndroidMediaPlayer alloc] init];
669
- [player reset];
670
- [player setDataSource:assetFd.fileDescriptor offset:assetFd.startOffset length:assetFd.length];
671
- #warning TODO: note sure how to set on finished listener for player and call the player's release() (not objc release) in the callback to close fd
672
- [player prepare];
673
- [player start];
674
- }
675
-
676
- if (assetFd) {
677
- [assetFd close];
678
- }
679
- // TODO: convert to ALSoundSource and return
680
- #else
681
662
ALBuffer* buffer = [self internalPreloadEffect: filePath reduceToMono: NO ];
682
663
if (nil != buffer)
683
664
{
684
665
return [channel play: buffer gain: volume pitch: pitch pan: pan loop: loop];
685
666
}
686
- #endif
687
667
return nil ;
688
668
}
689
669
You can’t perform that action at this time.
0 commit comments