hello,
thank you for that
now i found a method to create a progressbar with the bassenc.dll
it works fine if I use the lame encoder.
here is the code:
HTML Code:
Private Sub Dataform_Start()
Dim buffer(20000) As Byte
Dim inx As Long, wmahandle As Long, StreamID As Long
Dim strcmd As String
'this works fine --------->strcmd = App.Path & "\lame.exe " & "-b 192 " & "- " & Outputfile
'Initialisiert Player
Call BASS_SetConfig(BASS_CONFIG_FLOATDSP, BASSTRUE)
Call BASS_Init(1, 44100, 0, Dataform.hWnd, 0)
'Input Stream for Stdin
StreamID = BASS_StreamCreateFile(BASSFALSE, InputFile, 0, 0, BASS_STREAM_DECODE)
If StreamID = 0 Then
MsgBox "Kann keinen Stream erzeugen!"
Exit Sub
End If
' ----> this line is my problem the coreconverter always want a infile but it is delivered with the bassenc.dll (StreamID)
'(if I place here the inputfile then the progressbar didnīt work)
strcmd = App.Path & "\coreconverter.exe -errorfile=" & App.Path & "\error.txt" & " -outfile=" & """" & Outputfile & """" & " -convert_to = " & """mp3 (Lame)"""
frmRecTest.ProgressBar1.max = BASS_ChannelGetLength(StreamID)
'this call the commandline
Call BASS_Encode_Start(StreamID, strcmd, BASS_ENCODE_FP_16BIT, vbNull, 0)
RaiseEvent setDecodebar(BASS_ChannelGetLength(StreamID)) 'Infobar setzen
Do While BASS_ChannelIsActive(StreamID)
inx = BASS_ChannelGetData(StreamID, buffer(0), 19999)
RaiseEvent Decodebar(inx)
DoEvents
Loop
Call BASS_Encode_Stop(StreamID)
Call BASS_StreamFree(StreamID)
Call BASS_Free
RaiseEvent ready(True)
Set Dataform = Nothing
frmRecTest.ProgressBar1.value = 0
frmRecTest.ProgressBar1.max = 1
coreconverter use the stdin also as lame.
did you know whatīs wrong in the code?
thank you
streammaster