title
Products            Buy            Support Forum            Professional            About            Codec Central
 
Results 1 to 6 of 6

Thread: DMCSCRIPTINGLib

  1. #1

    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

  2. #2
    Administrator
    Join Date
    Apr 2002
    Posts
    39,287

    Re: DMCSCRIPTINGLib

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

  3. #3
    QueMaster donny's Avatar
    Join Date
    Oct 2002
    Location
    Europe - Serbia - Novi Sad
    Posts
    761

    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?

  4. #4
    Administrator
    Join Date
    Apr 2002
    Posts
    39,287

    Re: DMCSCRIPTINGLib

    Should end at 60

  5. #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 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

  6. #6
    Administrator
    Join Date
    Apr 2002
    Posts
    39,287

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •