2016-05-27 6 views
1

私はブックマークのオーディオファイルのストリーミングが必要です。アスタリスク - どのように私はオーディオファイルをブックマークすることができます

ファイルをストリームすることはできますが、0から始めることはできません。 1分に始まるようなものか、このようなもの。 誰でも教えてください。 編集:どのような部分を再生するにはどうすればよいですか? Offset:offsetバイトは再生を開始するので、ブックマークのバイトを取得する必要があります。

+0

AudioInputStreamクラス内でframePosメソッドを試しましたか? –

答えて

0

オフセットを使用して再生できるアプリケーションControlPlaybackがあります。

pro-sip*CLI> core show application ControlPlayback 

    -= Info about application 'ControlPlayback' =- 

[Synopsis] 
Play a file with fast forward and rewind. 

[Description] 
This application will play back the given <filename>. 
It sets the following channel variables upon completion: 
${CPLAYBACKSTATUS}: Contains the status of the attempt as a text string 
    SUCCESS 
    USERSTOPPED 
    ERROR 
${CPLAYBACKOFFSET}: Contains the offset in ms into the file where playback 
was at when it stopped. '-1' is end of file. 
${CPLAYBACKSTOPKEY}: If the playback is stopped by the user this variable 
contains the key that was pressed. 

[Syntax] 
ControlPlayback(filename[,skipms[,ff[,rew[,stop[,pause[,restart[,options]]]]]]]) 

[Arguments] 
skipms 
    This is number of milliseconds to skip when rewinding or fast-fo 
    rwarding. 
ff 
    Fast-forward when this DTMF digit is received. (defaults to '#') 
rew 
    Rewind when this DTMF digit is received. (defaults to '*') 
stop 
    Stop playback when this DTMF digit is received. 
pause 
    Pause playback when this DTMF digit is received. 
restart 
    Restart playback when this DTMF digit is received. 
options 
    o(time): 
     time - Start at <time> ms from the beginning of the file. 



[See Also] 
Not available 
関連する問題