Sending chars to a process

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
goeba
Earned a small fee
Earned a small fee
Posts: 21
Joined: Tue May 17, 2005 8:13 pm

Sending chars to a process

Post by goeba »

Hi,

I have started a process with wxExecute and redirected standard output and input.

But if I call

MP3Process->GetOutputStream() -> PutC('s');

nothing happens. The process (mpg123 , a command line program to play mp3 files) doesn´t react.

mpg123 uses stdin - at least it says so in the docs. If I start it in a shell, it reacts to commands given with the keyboard.

Am I doing something wrong in the way I put my chars to the process?

Thanks,

Andreas
goeba
Earned a small fee
Earned a small fee
Posts: 21
Joined: Tue May 17, 2005 8:13 pm

Re: Sending chars to a process

Post by goeba »

Hi,

it seems that the way mpg123 handles it´s input stream is out of the ordinary.

I have now tested vlc media player with it´s command-line interface, here I can send commands via the wxProcess input stream with no problems.
Post Reply