search for: _setmode

Displaying 20 results from an estimated 29 matches for "_setmode".

Did you mean: setmode
2017 Feb 09
1
[PATCH] Fix compile with cygwin
.../include/share/compat.h +++ b/include/share/compat.h @@ -98,7 +98,7 @@ #define FLAC__STRNCASECMP strncasecmp #endif -#if defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__ || defined __EMX__ +#if defined _MSC_VER || defined __MINGW32__ || defined __EMX__ #include <io.h> /* for _setmode(), chmod() */ #include <fcntl.h> /* for _O_BINARY */ #else diff --git a/src/libFLAC/stream_decoder.c b/src/libFLAC/stream_decoder.c index 2e1fdd5..d3b6e03 100644 --- a/src/libFLAC/stream_decoder.c +++ b/src/libFLAC/stream_decoder.c @@ -1253,9 +1253,6 @@ FILE *get_binary_stdin_(void) */...
2008 Jan 11
1
Patch for OS/2 STDIN/STDOUT
...STDIN/STDOUT work on OS/2 this small patch is needed: ---cut--- diff -ruN o:src/speexdec.c src/speexdec.c --- o:src/speexdec.c 2007-12-08 05:01:08.000000000 +0100 +++ src/speexdec.c 2008-01-12 00:48:00.000000000 +0100 @@ -231,6 +231,8 @@ { #if defined WIN32 || defined _WIN32 _setmode(_fileno(stdout), _O_BINARY); +#elif defined OS2 + _fsetmode(stdout,"b"); #endif fout=stdout; } diff -ruN o:src/speexenc.c src/speexenc.c --- o:src/speexenc.c 2007-12-08 05:01:08.000000000 +0100 +++ src/speexenc.c 2008-01-12 00:47:06.000000000 +0100 @@ -514,6...
2017 Apr 06
2
Zero length reported.
...lt;math.h> #include "vorbis/codec.h" #include "vorbis/vorbisfile.h" #ifdef _WIN32 #include <io.h> #include <fcntl.h> #endif char pcmout[4096]; int main (int argc, char** argv) { OggVorbis_File vf; int eof = 0; int current_section; #ifdef _WIN32 _setmode (_fileno (stdin), _O_BINARY); _setmode (_fileno (stdout), _O_BINARY); #endif if (ov_open_callbacks (stdin, &vf, NULL, 0, OV_CALLBACKS_NOCLOSE) < 0) { fprintf (stderr, "Input does not appear to be an Ogg bitstream.\n"); exit (1); } { cha...
2017 Apr 06
2
Zero length reported.
...lt;math.h> #include "vorbis/codec.h" #include "vorbis/vorbisfile.h" #ifdef _WIN32 #include <io.h> #include <fcntl.h> #endif char pcmout[4096]; int main (int argc, char** argv) { OggVorbis_File vf; int eof = 0; int current_section; #ifdef _WIN32 _setmode (_fileno (stdin), _O_BINARY); _setmode (_fileno (stdout), _O_BINARY); #endif if (ov_open_callbacks (stdin, &vf, NULL, 0, OV_CALLBACKS_NOCLOSE) < 0) { fprintf (stderr, "Input does not appear to be an Ogg bitstream.\n"); exit (1); } { cha...
2006 May 23
3
[LLVMdev] Binary output to cout on Windows
The solution (provided in Microsoft's documentation) is to add: #include <cstdio> #include <io.h> #include <fcntl.h> and run: int result = _setmode( _fileno(stdin), _O_BINARY ); if( result == -1 ) { std::cerr<<"Cannot set input mode to binary."<<std::endl; return 1; } result = _setmode( _fileno(stdout), _O_BINARY ); if( result == -1 ) { std::cerr<<"Cannot set output mode to binary."<<std::e...
2017 Apr 11
1
[Vorbis-dev] Zero length reported.
...e <io.h> >> #include <fcntl.h> >> #endif >> >> char pcmout[4096]; >> >> int main (int argc, char** argv) >> { >> OggVorbis_File vf; >> int eof = 0; >> int current_section; >> >> #ifdef _WIN32 >> _setmode (_fileno (stdin), _O_BINARY); >> _setmode (_fileno (stdout), _O_BINARY); >> #endif >> >> if (ov_open_callbacks (stdin, &vf, NULL, 0, OV_CALLBACKS_NOCLOSE) < 0) >> { >> fprintf (stderr, "Input does not appear to be an Ogg bitstream.\n&...
2002 Feb 12
2
problem with Vorbis DLL's
...long); HMODULE hVorbisFile; OVOPEN hOvOpen; hVorbisFile = LoadLibrary(_T("Vorbisfile.DLL")); hOvOpen = (OVOPEN)GetProcAddress(hVorbisFile, _T("ov_open")); printf(filename, "music\\Track%02d.OGG", track_number); vorbis_fd = fopen(filename, _T("rb")); _setmode( _fileno( vorbis_fd ), _O_BINARY ); if ((hOvOpen)(vorbis_fd, &vf, NULL, 0) < 0) { then POOF! <p>thanks! Brent <p>--- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/ To unsubscribe from this list, send a message to 'v...
2004 Sep 10
2
FLAC->mpc transcoding
...code a .flac : "MPC Encoder 1.02 --Beta-- (C) 1999-2002 Buschmann/Klemm/Piecha FLAC does not work properly under Windows. They have forgotten to switch to binary mode if reading/writing from/to stdin/stdout, so the data I got is corrupted and unusable. The problem can be fixed by adding: _setmode ( _fileno (fp), _0_BINARY ); where fp is stdin or stdout if used as data source or destination. More sophisticated code you can find in the mppdec package in the file mppdec.h which is suitable for a larger list of Operating Systems/Cmpilers. This problem has nothing to do with Windows, DOS or Ma...
2017 Apr 07
0
Fwd: [Vorbis-dev] Zero length reported.
...isfile.h" > > #ifdef _WIN32 > #include <io.h> > #include <fcntl.h> > #endif > > char pcmout[4096]; > > int main (int argc, char** argv) > { > OggVorbis_File vf; > int eof = 0; > int current_section; > > #ifdef _WIN32 > _setmode (_fileno (stdin), _O_BINARY); > _setmode (_fileno (stdout), _O_BINARY); > #endif > > if (ov_open_callbacks (stdin, &vf, NULL, 0, OV_CALLBACKS_NOCLOSE) < 0) > { > fprintf (stderr, "Input does not appear to be an Ogg bitstream.\n"); > exit...
2004 Aug 06
2
new utility - ezstream
At 03:07 PM 1/30/2004, you wrote: >Thanks for your work on this oddsock. It's a major feature that's been >missing from the Win32 environment. I presume you will be offering a Win32 >binary on your site at some stage. why sure! http://www.icecast.org:8082/files/ezstream_win32_0.1.0_setup.exe also, a note of mention, reading from stdin seems to be broken on win32, but works
2004 Sep 10
3
Cygwin patch
...erested in my Cygwin binaries (no Ogg support), I can provide an encap package file. Let me know. --- orig/flac-1.0.3/src/flac/file.c 2002-02-17 17:22:49 -0500 +++ flac-1.0.3/src/flac/file.c 2002-08-13 08:25:38 -0400 @@ -27,6 +27,7 @@ #endif #ifdef __CYGWIN__ #include <io.h> /* for _setmode(), O_BINARY */ +#include <fcntl.h> #endif #include <sys/stat.h> /* for stat(), maybe chmod() */ #include <string.h> /* for strrchr() */ diff -ubr orig/flac-1.0.3/src/libFLAC/file_decoder.c flac-1.0.3/src/libFLAC/file_decoder.c --- orig/flac-1.0.3/src/libFLAC/file_decoder.c 2...
2006 May 23
0
[LLVMdev] Binary output to cout on Windows
On Tue, 23 May 2006, Michael Smith wrote: > The solution (provided in Microsoft's documentation) is to add: > #include <cstdio> > #include <io.h> > #include <fcntl.h> > and run: > int result = _setmode( _fileno(stdin), _O_BINARY ); > if( result == -1 ) > { std::cerr<<"Cannot set input mode to binary."<<std::endl; return 1; > } > result = _setmode( _fileno(stdout), _O_BINARY ); > if( result == -1 ) > { std::cerr<<"Cannot set output mode to bi...
2006 May 23
1
[LLVMdev] Binary output to cout on Windows
...s needs to be done. http://llvm.org/bugs Reid. On Tue, 2006-05-23 at 10:27 -0700, Michael Smith wrote: > The solution (provided in Microsoft's documentation) is to add: > #include <cstdio> > #include <io.h> > #include <fcntl.h> > and run: > int result = _setmode( _fileno(stdin), _O_BINARY ); > if( result == -1 ) > { std::cerr<<"Cannot set input mode to binary."<<std::endl; return 1; > } > result = _setmode( _fileno(stdout), _O_BINARY ); > if( result == -1 ) > { std::cerr<<"Cannot set output mode...
2002 Dec 27
1
Vorbisgain in ogg123
I'm considering patching my copy of ogg123 to support vorbisgain tags. Is there any interest in folding this sort of patch into the main line ogg123? Has anyone done this already (or to another command line ogg player)? John --- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/ To unsubscribe from this list, send a message to
2012 Dec 05
7
ov_open_callbacks takes so much time to open 210 MB OGG file
Why ov_open_callbacks(fd_, &vf, NULL, 0, OV_CALLBACKS_NOCLOSE) takes so long to open OGG file? The OGG file has just 210 MB. It takes a lot of time open the file. I am working on OGG audio recorder and player. Thanks in advance! With kind regards, Pavel
2013 Apr 02
2
flac 1.3.0pre3 pre-release
Janne Hyv?rinen wrote: > Surprisingly flac_mac had mistakenly gotten extra parameters for safe > string functions requiring further patching. > And here's patches for the changes in git for flactimer. Applied, thanks. > I noticed compat.h patch didn't make it into git. I know it may not be > perfect patch but unistd.h is in two different #ifdef checks. First one >
2013 Apr 07
0
flac 1.3.0pre3 pre-release
...2de65 100644 --- a/include/share/compat.h +++ b/include/share/compat.h @@ -93,13 +93,9 @@ #define FLAC__STRNCASECMP strncasecmp #endif -#if defined _MSC_VER || defined __MINGW32__ +#if defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__ || defined __EMX__ #include <io.h> /* for _setmode(), chmod() */ #include <fcntl.h> /* for _O_BINARY */ -#endif -#if defined __CYGWIN__ || defined __EMX__ -#include <io.h> /* for setmode(), chmod() */ -#include <fcntl.h> /* for _O_BINARY */ #else #include <unistd.h> /* for chown(), unlink() */ #endif
2004 Aug 06
0
new utility - ezstream
...0_setup.exe > > also, a note of mention, reading from stdin seems to be broken on win32, > but works very well on unix...but hey, this is a first revision :) > > oddsock > I haven't yet looked at the code, but for stdin to work correctly on windows, you usually need to call: _setmode(_fileno(stdin), _O_BINARY); That's for MSVC. There are different variations on this for other platforms and other win32 compilers - see oggenc/platform.c:setbinmode() if you need to know. Mike <p>--- >8 ---- List archives: http://www.xiph.org/archives/ icecast project homepage: h...
2004 Nov 16
0
Re: Win32, file descriptors and rb_io_check_writable()
...>(although wordpad handles them properly). I guess I should find an >octal dump tool for windows to verify. Hopefully, you''ll see what I >mean. > Sorry if you receive this message again. My mail account seems to be messed. That is due to detault translation mode. Insert _setmode(NUM2INT(args[0]),_O_TEXT); after RFILE(self)->fptr->mode = rb_io_mode_flags("w+"); RFILE(self)->fptr->f = rb_fdopen(NUM2INT(args[0]),"w+"); in case of TEXT MODE. >Regards, > >Dan Regards, Park Heesob --MIME Multi-part separator--
2004 Nov 16
0
Re: Win32, file descriptors and rb_io_check_writable()
Hi Park, > That is due to detault translation mode. > > Insert > _setmode(NUM2INT(args[0]),_O_TEXT); > after > RFILE(self)->fptr->mode = rb_io_mode_flags("w+"); > RFILE(self)->fptr->f = rb_fdopen(NUM2INT(args[0]),"w+"); > in case of TEXT MODE. Ah, thanks. On a side note, any clue as to why Nobu''s suggestion doe...