Re:Creating an interface for Lame

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re:Creating an interface for Lame

sakya
Hi!

To get the output of a command:
Declare a process variable (form level):

    Private Proc as Process

launch the external command with the EXEC command like:

    EXEC ["lame", "audio.wav", "audio.mp3"] for READ as proc

In this way you launch lame and the Gambas program continues to next
line (doesn't wait for Lame to end)

Declare a sub Process_Read and read the lame's output:

PUBLIC SUB Process_Read()
  DIM line as String

  LINE INPUT #LAST, line
 
END

Analyze the lame's output and do what you need to. :-)

If you want to read also errors from lame:

PUBLIC SUB Process_Error(sData AS String)

END

The sData variable contains the error text.

Ciaooo
Sakya


       

       
               
___________________________________
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB
http://mail.yahoo.it



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Loading...