illustrate
Products            Buy            Support Forum            Registrations            Professional            About           
 

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
    • 44700

    #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
        • 44700

        #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
            • 44700

            #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

            • Darryl R
              dBpoweramp Enthusiast

              • Jul 2014
              • 101

              #7
              I recently wrote a C# program to add tags to my untagged files before loading into Roon. The heart of the logic is a series of dMC.WriteIDTag() calls for tracks within an album. Does each method call open and close the file, and if so, is there a more efficient way to process the tag collection for each track? Thanks.

              Comment

              • Spoon
                Administrator
                • Apr 2002
                • 44700

                #8
                Yes each call will open and close the file, this might help a different way :

                The utility codec [ID Tag Update] (R4 or later) and the DSP effect ID Tag Processing (R10 or later) contain an option Externally Script Tags Externally scripting allows tag actions to take place which could not otherwise be accommodated in dBpoweramp, the scripting language (in this example uses VB Scripting) can do almost
                Spoon
                www.dbpoweramp.com

                Comment

                • Darryl R
                  dBpoweramp Enthusiast

                  • Jul 2014
                  • 101

                  #9
                  Thanks Spoon, but I prefer the independent program approach. Any way to have a little lower-level access into your scripting engine, at least to write multiple tags together? Or perhaps if WriteIDTag() could take in an array?
                  Last edited by Darryl R; January 22, 2025, 12:57 AM.

                  Comment

                  Working...