search for: feof

Displaying 20 results from an estimated 140 matches for "feof".

Did you mean: eof
2014 Oct 28
3
[Bug 2301] New: test_sshbuf_misc.c:44 ASSERT_INT_NE(feof(out), 0) failed
https://bugzilla.mindrot.org/show_bug.cgi?id=2301 Bug ID: 2301 Summary: test_sshbuf_misc.c:44 ASSERT_INT_NE(feof(out), 0) failed Product: Portable OpenSSH Version: 6.7p1 Hardware: MIPS OS: IRIX Status: NEW Severity: enhancement Priority: P5 Component: Regression tests Assignee: unassigned-bug...
2020 Jul 25
0
[klibc:master] stdio: Define all the _unlocked functions and macros
...t.org.uk> --- usr/include/stdio.h | 20 ++++++++++++++++++++ usr/klibc/fgets.c | 1 + usr/klibc/fputc.c | 1 + usr/klibc/fputs.c | 1 + usr/klibc/fread2.c | 1 + usr/klibc/fwrite2.c | 2 ++ usr/klibc/stdio/clearerr.c | 1 + usr/klibc/stdio/feof.c | 1 + usr/klibc/stdio/ferror.c | 1 + usr/klibc/stdio/fflush.c | 2 +- usr/klibc/stdio/fgetc.c | 1 + usr/klibc/stdio/fileno.c | 1 + 12 files changed, 32 insertions(+), 1 deletion(-) diff --git a/usr/include/stdio.h b/usr/include/stdio.h index 1d45fe1a..521213df 100644 --- a/...
2004 Nov 16
3
version 1.0.1 X 1.1.4
...om the file encoded using version 1.1.4. I can encode and decode using the same version, but I can not exchange versions. Can someone show me what I am doing wrong ? encoder 1.0.1: while( 1 ) { /* Read a 16 bits/sample audio frame */ fread( in, sizeof( short ), FRAME_SIZE, fin ); if( feof( in ) ) break; /* Copy the 16 bits values to float so Speex can work on them */ for( i = 0; i < FRAME_SIZE; i++ ) input[ i ] = in[ i ]; /* Flush al the bits in the struct so we can encode a new frame */ speex_bits_reset( &bits ); /* Encode the frame */...
2012 Mar 14
0
Audio file is corrupted after decoding
...*state; SpeexBits bits; int i, tmp; state = speex_encoder_init(&speex_wb_mode); tmp=8; speex_encoder_ctl(state, SPEEX_SET_QUALITY, &tmp); fin = fopen(inFile, "r"); fout=fopen(outFile,"w"); speex_bits_init(&bits); int bool=1; while (!feof(fin)) { if(bool==1) { /* skip wav header */ fseek ( fin , 44 , SEEK_SET ); bool=0; } /*Read a 16 bits/sample audio frame*/ fread(in, sizeof(short), FRAME_SIZE, fin); if (feof(fin)) break; speex_bits_reset(&bits); speex_encode_int(...
2004 Nov 17
2
version 1.0.1 X 1.1.4
...e using the same version, but >>I can not exchange versions. Can someone show me what I am doing wrong ? >> >>encoder 1.0.1: >>while( 1 ) >>{ >> /* Read a 16 bits/sample audio frame */ >> fread( in, sizeof( short ), FRAME_SIZE, fin ); >> if( feof( in ) ) >> break; >> >> /* Copy the 16 bits values to float so Speex can work on them */ >> for( i = 0; i < FRAME_SIZE; i++ ) >> input[ i ] = in[ i ]; >> >> /* Flush al the bits in the struct so we can encode a new frame */ >&gt...
2010 Jan 28
1
Trouble in decoding speex on PC
...ex data, hence read 26 bytes of encoded data from file and processed as shown below.. But it gives error like - Invalid mode and stream got corrupted...What could be the reason? Also how do I calculate the number of speex bytes to be decoded at a given time.. Any help will be appreciated.. while (!feof(fin)) ?? { ??? ? fread(tempd, 1, 26, fin); ????? if (feof(fin)) ???????? break; ????? speex_bits_reset(&bits); ??? ?speex_bits_read_from(&bits, tempd, 26);??? ? ????? speex_bits_rewind(&bits); ????? speex_decode_int(dec, &bits, out_short); fwrite(&out_short[skip_group_delay...
2005 Oct 17
6
Error Executing sampledec in VC++
...he code below Thanks, Mon Portion of the revised code: decstate = speex_decoder_init (&speex_nb_mode); // Set default options for decoding: temp = 1; speex_decoder_ctl(decstate, SPEEX_SET_ENH, &temp); // Initialize spxbits (structure SpeexBits) speex_bits_init (&spxbits); while (!(feof(fo))) // this is where the problem starts { fread (&nbBytes, sizeof(int), 1, fo); fread (cbits, 1, nbBytes, fo); cout << "1"; // just to see whether the loop iterates speex_bits_read_from (&spxbits, cbits, nbBytes); speex_decode (decstate, &spxbits, pcm); // Copy 1 f...
2007 Apr 02
1
Problems with stereo data
...peex_encoder_ctl(State, SPEEX_SET_VBR, &Temp); speex_encoder_ctl(State, SPEEX_SET_VBR_QUALITY, &Tmp); FILE* fin = fopen(argv[1], "rb"); FILE* fout = fopen(argv[2], "wb"); SpeexBits Bits; speex_bits_init(&Bits); short Frame[FrameSize]; char Cbits[200]; while (!feof(fin)) { speex_bits_reset(&Bits); fread(Frame, sizeof(short), FrameSize, fin); speex_encode_stereo_int(Frame, FrameSize, &Bits); speex_encode_int(State, Frame, &Bits); short BytesToWrite = speex_bits_write(&Bits, Cbits, 200); fwrite(&BytesToWrite, sizeof(short), 1, fout);...
2006 Nov 02
0
ssh strlen fixes
...retrieving revision 1.64 diff -u -p -r1.64 misc.c --- misc.c 3 Aug 2006 03:34:42 -0000 1.64 +++ misc.c 2 Nov 2006 20:05:41 -0000 @@ -604,11 +604,15 @@ read_keyfile_line(FILE *f, const char *f { while (fgets(buf, bufsz, f) != NULL) { (*lineno)++; - if (buf[strlen(buf) - 1] == '\n' || feof(f)) { + if (buf[0] != '\0' && buf[strlen(buf) - 1] == '\n' || feof(f)) { return 0; } else { - debug("%s: %s line %lu exceeds size limit", __func__, - filename, *lineno); + if (buf[0] != '\0') + debug("%s: %s line %lu exceeds size l...
2005 Jan 13
4
Manager API !!!!!!!!!
...$out); $in = "Action: ExtensionState\r\n"; $in .= "Exten: 4367\r\n\r\n"; $in .= "Context: office\r\n\r\n"; $in .= "ActionID: \r\n\r\n"; $in .= "Action: Logoff\r\n\r\n"; fwrite($fp,$in); while (!feof($fp)) { echo fgets($fp, 128); } fclose($fp); } ?> The first prob is it ignores the Context and just goes to default. The second is anyone know what ActionID is ? Best Regards Simon ----------------------------------------------- This message...
2004 Aug 06
3
icecast2 ogg vorbis client request headers
...ably elsewhere in your > code. this is what i have, and does work with mp3, but ogg does not want to work. im testing with winamp, you think that may be the issue? <p><p>fwrite($fp,"GET /mymp3 HTTP/1.1\nUser-Agent:$HTTP_USER_AGENT\n\n"); for ($i=0; $i<120; $i++) { if (feof($sp)) break; $str.=fread($sp,4096); usleep(200000); if (strpos($str,"\r\n\r\n")) break; } flush(); echo substr($str,strpos($str,"\r\n\r\n")+4); flush(); while(!$shutdown_flag) { $buf=fread($sp,4096); if (feof($sp)) $shutdown_flag=1; echo $buf; flush(); usleep(7...
2004 Aug 06
3
icecast2 ogg vorbis client request headers
So instead set it from 4096 bytes to 0 and increment till it reaches the end? show me an example please. <p>Dave St John Mediacast1 Administration Need Support ? http://mediacast1.com/helpdesk ----- Original Message ----- From: "oddsock" <oddsock@oddsock.org> To: <icecast-dev@xiph.org> Sent: Thursday, April 01, 2004 9:15 PM Subject: Re: [icecast-dev] icecast2 ogg
2005 Oct 17
3
Error Executing sampledec in VC++
...mp.spx","rb"); if (fo == NULL) cout << "Error!\n"; else cout << "Okay!\n"; fs = fopen ("pcmfile", "wb"); if (fs == NULL) cout << "Error creating file!\n"; else cout << "File created!\n"; while (!(feof(fo))) { decstate = speex_decoder_init (&speex_nb_mode); // Set default options for decoding: temp = 1; speex_decoder_ctl(decstate, SPEEX_SET_ENH, &temp); // Initialize spxbits (structure SpeexBits) speex_bits_init (&spxbits); fread (&nbBytes, sizeof(int), 1, fo); fread (cbits,...
2006 Oct 12
1
Problem with encoding and decoding
...ile = argv[1]; fin = fopen(file, "w"); /*Initialization of the structure that holds the bits*/ speex_bits_init(&bits); while (1) { /*Read a 16 bits/sample audio frame*/ read(card,in,FRAME_SIZE); //fread(in, sizeof(short), FRAME_SIZE, fin); //if (feof(fin)) // break; /*Copy the 16 bits values to float so Speex can work on them*/ for (i=0;i<FRAME_SIZE;i++) input[i]=in[i]; /*Flush all the bits in the struct so we can encode a new frame*/ speex_bits_reset(&bits); /*Encode the frame*/ sp...
2007 Feb 13
1
Hello Guys
...quot;ahmed.wav"; fin = fopen(inFile, "r"); fout = fopen("ahmed2.wav","w"); /*Initialization of the structure that holds the bits*/ speex_bits_init(&bits); while (1) { /*Read a 16 bits/sample audio frame*/ fread(in, sizeof(short), FRAME_SIZE, fin); if (feof(fin)) break; /*Copy the 16 bits values to float so Speex can work on them*/ for (i=0;i<FRAME_SIZE;i++) input[i]=in[i]; /*Flush all the bits in the struct so we can encode a new frame*/ speex_bits_reset(&bits); /*Encode the frame*/ speex_encode(state, input, &bits); /*Copy the bi...
2020 Jul 25
0
[klibc:master] stdio: Add extern definition of clearerr()
...6dc..7929dee5 100644 --- a/usr/klibc/Kbuild +++ b/usr/klibc/Kbuild @@ -75,7 +75,7 @@ klib-y += vsnprintf.o snprintf.o vsprintf.o sprintf.o \ stdio/fread.o stdio/fwrite.o stdio/fflush.o \ stdio/ungetc.o stdio/fgetc.o \ stdio/fseek.o stdio/ftell.o stdio/rewind.o \ - stdio/fileno.o stdio/feof.o stdio/ferror.o + stdio/fileno.o stdio/feof.o stdio/ferror.o stdio/clearerr.o klib-$(CONFIG_KLIBC_ERRLIST) += errlist.o diff --git a/usr/klibc/stdio/clearerr.c b/usr/klibc/stdio/clearerr.c new file mode 100644 index 00000000..fb565144 --- /dev/null +++ b/usr/klibc/stdio/clearerr.c @@ -0,0 +...
2004 Nov 16
0
version 1.0.1 X 1.1.4
.... I can encode and decode using the same version, but > I can not exchange versions. Can someone show me what I am doing wrong ? > > encoder 1.0.1: > while( 1 ) > { > /* Read a 16 bits/sample audio frame */ > fread( in, sizeof( short ), FRAME_SIZE, fin ); > if( feof( in ) ) > break; > > /* Copy the 16 bits values to float so Speex can work on them */ > for( i = 0; i < FRAME_SIZE; i++ ) > input[ i ] = in[ i ]; > > /* Flush al the bits in the struct so we can encode a new frame */ > speex_bits_reset( &...
2004 Nov 17
0
version 1.0.1 X 1.1.4
...>I can not exchange versions. Can someone show me what I am doing wrong ? > >> > >>encoder 1.0.1: > >>while( 1 ) > >>{ > >> /* Read a 16 bits/sample audio frame */ > >> fread( in, sizeof( short ), FRAME_SIZE, fin ); > >> if( feof( in ) ) > >> break; > >> > >> /* Copy the 16 bits values to float so Speex can work on them */ > >> for( i = 0; i < FRAME_SIZE; i++ ) > >> input[ i ] = in[ i ]; > >> > >> /* Flush al the bits in the struct so w...
2005 Jul 01
1
astmanproxy
...t, "Action: Login\r\n"); fputs($socket, "UserName: xxx\r\n"); fputs($socket, "Secret: xxx\r\n\r\n"); fputs($socket, "Action: Command\r\n"); fputs($socket, "Command: Show Channels\r\n\r\n"); fputs($socket, "Action: Logoff\r\n\r\n"); while (!feof($socket)) { $wrets[] = fread($socket, 8192); } fclose($socket); var_dump($wrets); ?> </pre> Output in debugmode at the console is correct, but I cannot read the output in php. If I use port 5038 I get the output, but I want to connect with multiple clients, so I should't use a direc...
2004 Aug 06
2
decode in ppc 2003
...fin = fopen(inFile,"r"); speex_bits_init(&bits); while (1) { fread(&nbBytes, sizeof(int), 1, fin); fprintf (stderr, "nbBytes: %d\n", nbBytes); if (feof(fin)) break; /*Read the "packet" encoded by sampleenc*/ fread(cbits, 1, nbBytes, fin); /*Copy the data into the bit-stream struct*/ speex_bits_read_fro...