开发者

How to Play audio files by specifying Start and end in Corona or iOS & Android?

开发者 https://www.devze.com 2023-04-04 22:12 出处:网络
Scenario: I have a Long file - Say 30 Minutes. I want to play the file in interval 7-10 minutes. how to play a mp3 file from the middle

Scenario: I have a Long file - Say 30 Minutes. I want to play the file in interval 7-10 minutes.

how to play a mp3 file from the middle

C# play MP3 file from specified time for the specified time

The above questions seem to be similar but they are for Desktop Apps. I am not sure if they can be used in iOS & Android or Corona.

Detail:

I would be really thankful if someone could tell me how to play a part of a sound file, for then it would be possible to do the cuts in a virtual manner. If i could say something to the effect

media.load( 'sound.mp3', start = 5.43, stop = 9.75 )

then i'd be able to skip cutting of separate sound files in a wave editor. Maybe there is already a way to do somethin开发者_Python百科g similar? I couldn't find anything in the docs. Any help would be greatly appreciated. Thanks.

Update:

Found a pyglet project for the same. http://code.google.com/p/suimm/


Just use audio.play() with the 'duration' parameter and audio.seek() to set the starting position.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号