[fpc-pascal] File Descriptor in Windows ?
andrewd207 at aol.com
Wed Mar 25 17:59:19 CET 2015
On 03/25/2015 08:23 AM, fredvs wrote:
> Sorry to sorry to bother you with that file descriptors again... ;-(
> There are some answers there on mpg123 forum.
> They explain that "simple stdin/stdout file descriptors would work."
> Of course all what they explained is in C ;-(
> OK, but how can i use "simple stdin/stdout file descriptors" in Pascal ?
> What is the code to retrieve that stdin/stdout file descriptors in Windows?
> Many thanks.
I've been thinking that for your purposes you could use
Then you could do
mpg123_open_handle(mpg, Output); //Output is a TStream descendant
and the functions you supply with mpg123_replace_reader_handle can just
read directly from the TStream. Then you don't have to rely on anything
on each OS other than some TStream descendant can read the file you want
PS I noticed these functions don't exist yet in your mpg123 bindings.
More information about the fpc-pascal