title
Products            Buy            Support Forum            Professional            About            Codec Central
 

DMCSCRIPTINGLib

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • streammaster

    • Jul 2007
    • 2

    DMCSCRIPTINGLib

    hello,
    in my project i want to use a progressbar. Does the DMCSCRIPTNGLib support any function how much of the conversation is done?

    I´ve tried the scripting engine with the RedirectStandardOutput to use the little "*" with the RegularExpressions class but only when the conversation is done the .Readline get the 59 "*".

    I also used the RedirectStandardError pipe.

    thank you

    streammaster
  • Spoon
    Administrator
    • Apr 2002
    • 44509

    #2
    Re: DMCSCRIPTINGLib

    Reading the * is as close as you can get to getting the progress bars through scripting.
    Spoon
    www.dbpoweramp.com

    Comment

    • donny
      dBpoweramp Guru

      • Oct 2002
      • 761

      #3
      Re: DMCSCRIPTINGLib

      well many progress bars are unprecise, so try filing it up as you go... one of the main reasons for progres bars are that you see that something is happening...

      is it always 59? or it depends on the file length?

      Comment

      • Spoon
        Administrator
        • Apr 2002
        • 44509

        #4
        Re: DMCSCRIPTINGLib

        Should end at 60
        Spoon
        www.dbpoweramp.com

        Comment

        • streammaster

          • Jul 2007
          • 2

          #5
          Re: DMCSCRIPTINGLib

          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]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
          [/HTML]

          coreconverter use the stdin also as lame.
          did you know what´s wrong in the code?

          thank you

          streammaster

          Comment

          • Spoon
            Administrator
            • Apr 2002
            • 44509

            #6
            Re: DMCSCRIPTINGLib

            When using std in with coreconverter you have to psss the channels, frequency and bits on command line, the data should be supplied with no wave headers.
            Spoon
            www.dbpoweramp.com

            Comment

            Working...

            ]]>