I use AudioStreamer library as audio recorder; It records fine and when i click on playback button, it plays fine; once the record activity module is still at foreground. I wanted to copy the recorded .wav audio to another directory so i can rename it, but is like the actual audio file never existed. Playback gets file from Pool.Load(SourceDir,SourceFileName), but destination audio file never existed in such directory:
How can i get actual audio that i can copy, rename and listed for future playback?
File.MakeDir(rp.GetSafeDirDefaultExternal(""),"myprojaudio")
SourceDir = rp.GetSafeDirDefaultExternal("myprojaudio")
Dim SourceFileName As String = "yourfilename.wav" 'The file you wish to use
PoolID = Pool.Load(SourceDir,SourceFileName)
How can i get actual audio that i can copy, rename and listed for future playback?
Sub PlayRecording
Dim ret As Int 'Used in call to Pool.Play. ret = 0 if error occurs
Dim PoolID As Int 'Identifies the Pool number when a sound file is loaded
'File.DirDefaultExternal 'or the Directory where your file is located
File.MakeDir(rp.GetSafeDirDefaultExternal(""),"myprojaudio")
SourceDir = rp.GetSafeDirDefaultExternal("myprojaudio")
Dim SourceFileName As String = "yourfilename.wav" 'The file you wish to use
PoolID = Pool.Load(SourceDir,SourceFileName) 'Loads the file and gets it's number in the pool.
MsgboxAsync("SourceDir =" & SourceDir, SourceFileName)
Sleep(100) 'Some delay required between pool loading and playback - I'm unsure why or how much?
'Play the sound
'ret = Pool.Play(PoolID,VolumeLeft,VolumeRight,Priority,Loop,Pitch)
ret = Pool.Play(PoolID,1,1,1,0,1)
End Sub
Sub Btnrecord_Click
Movie1.Paused = False
buffers.Clear
streamer.StartRecording
recordingStart = DateTime.Now
timer1.Enabled = True
Timer1_Tick
LbClock.Text = "RECORDING..."
LbClock.TextSize = "35"
BtnPlayback.Enabled = False
End Sub
Sub streamer_RecordBuffer (Buffer() As Byte)
'collect the recording data
buffers.Add(Buffer)
End Sub
Dim ret As Int 'Used in call to Pool.Play. ret = 0 if error occurs
Dim PoolID As Int 'Identifies the Pool number when a sound file is loaded
'File.DirDefaultExternal 'or the Directory where your file is located
File.MakeDir(rp.GetSafeDirDefaultExternal(""),"myprojaudio")
SourceDir = rp.GetSafeDirDefaultExternal("myprojaudio")
Dim SourceFileName As String = "yourfilename.wav" 'The file you wish to use
PoolID = Pool.Load(SourceDir,SourceFileName) 'Loads the file and gets it's number in the pool.
MsgboxAsync("SourceDir =" & SourceDir, SourceFileName)
Sleep(100) 'Some delay required between pool loading and playback - I'm unsure why or how much?
'Play the sound
'ret = Pool.Play(PoolID,VolumeLeft,VolumeRight,Priority,Loop,Pitch)
ret = Pool.Play(PoolID,1,1,1,0,1)
End Sub
Sub Btnrecord_Click
Movie1.Paused = False
buffers.Clear
streamer.StartRecording
recordingStart = DateTime.Now
timer1.Enabled = True
Timer1_Tick
LbClock.Text = "RECORDING..."
LbClock.TextSize = "35"
BtnPlayback.Enabled = False
End Sub
Sub streamer_RecordBuffer (Buffer() As Byte)
'collect the recording data
buffers.Add(Buffer)
End Sub
Last edited: