search for: bytesread

Displaying 10 results from an estimated 10 matches for "bytesread".

Did you mean: bytes_read
2001 Feb 14
1
Problem with seek functions,
...n Mon, 12 February 2001, OmegaDan wrote: [snip code] Hmm, weird.. that does work for me. I only had the trouble that ov_time_tell returned negative infinity after a ov_time_seek to 0 secs. This is my code: function TMainForm.ReadBuf(Buffer: PChar; Size: Longword; var Time: Single): Longword; var BytesRead, Change: Longword; begin BytesRead := 0; Time := ov_time_tell(vf^); if Time < 0 then // check against NAN, -INF Time := 0; repeat Change := ov_read(vf^, @Buffer[BytesRead], Size - BytesRead, 0, 2, 1, StreamNumber); BytesRead := BytesRead + Change; until (Change = 0) o...
2004 Aug 06
1
About reducing noise..
...uninitialize For decoding . SpeexBits bits; int i, tmp; state = speex_decoder_init(&speex_nb_mode); tmp =1; speex_decoder_ctl(state, SPEEX_SET_ENH, &tmp); speex_bits_init(&bits); char temp[10]; long sizeToRead = 4; while(1) { int ret = ReadFile(file,temp, sizeToRead , &bytesRead,NULL); if( bytesRead == 0 ) { break; } nbBytes = atoi(temp); totalBytesRead += bytesRead; ret = ReadFile(file, cbits, nbBytes, &bytesRead, NULL); totalBytesRead += bytesRead; speex_bits_read_from(&bits, cbits, nbBytes); speex_dec...
2006 Oct 09
1
Vorbis primitive API examples (LONG)
...mand-line" support */ #endif #define dprintf(...) fprintf(stderr, __VA_ARGS__) #define BCHUNKSIZE 8192 static long bytesConsumed = 0; // FIXME: This is one of the places that can throw errors int grabData(ogg_sync_state *oy) { unsigned char* bb = ogg_sync_bufferin(oy, BCHUNKSIZE); long bytesRead = fread(bb, 1, BCHUNKSIZE, stdin); dprintf("Consumed: %ld bytes\n", bytesRead); if (bytesRead == 0) { // For now, EOF return(-1); } ogg_sync_wrote(oy, bytesRead); bytesConsumed += bytesRead; return(0); } int main() { int rv0 = 0; int dr0 = 0; // These abbre...
2001 Feb 27
1
Winamp plugin; http streaming
...lternative; boundary="----=_NextPart_000_0093_01C0A035.B08D3950" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Changing this line from httpstream.c in the BufferThread function: bytesRead =3D recv(pThreadData->tcpSocket, pThreadData->circularBuffer + = pThreadData->circularBufferEnd, 1, 0); to read as follows: bytesRead =3D recv(pThreadData->tcpSocket, pThreadData->circularBuffer + = pThreadData->circularBufferEnd, bytesToRead, 0); peeds up streaming noticeably,...
2006 Sep 11
4
encode, decode and encode again
(I've already posted this message month ago, but nobody answered, may be it was not delivered to newsgroup?) Hello, All. I wrote an encoder-decoder based on example from OGG-Vorbis SDK. This encoder can encode a large amount of small WAV-files with equal parameters into one sound archive. Then I decode this sound archive back into large amount of small WAV-files. Theese files are
2015 Nov 05
3
Opusfile seeking bug
...ons here to make it build as C89. static const long BufferSize = 8192; ogg_sync_state m_syncState; ogg_stream_state m_streamState; int64_t m_lastGranulePos = 0; int64_t failingSeekPoint = -1; int32_t serialno = -1; int fpp, spf; int decoding = 1; ogg_page page; char* buffer = NULL; long bytesRead = 0; uint8_t headerFLags = 0; int pageContinuesPacket = 0; int firstPacketInPage = 1; int packetsToFetch = 1; int packetOutRet; FILE* fp = fopen(filename, "rb"); ogg_sync_init(&m_syncState); while(decoding) { while(ogg_sync_pageout(&m_syncState, &page) != 1) {...
2014 Dec 19
2
[LLVMdev] [Patches][RFC] What to do about bitcode streaming.
...me. Do we have a test of llvm-dis w/ files that have a bitcode wrapper + misc data surrounding the true bitcode contents? The old dropLeadingBytes would track how many bytes were skipped so that later, reading address N would mean reading N + BytesSkipped. It also subtracted the skipped bytes from BytesRead, and I haven't looked closely enough to see if there is similar state being tracked anymore. @@ -218,18 +214,13 @@ public: void freeState(); bool canSkipToPos(size_t pos) const { - // pos can be skipped to if it is a valid address or one byte past the end. - return pos == 0 || Bit...
2012 Mar 27
0
App. Delisprint hangs on second run
...eadFile+0x34e(hFile=0x34, hEvent=0x0(nil), apc=(nil), apc_user=0x0(nil), io_status=0x53e858, buffer=0x53e92c, length=0x10, offset=(nil), key=0x0(nil)) [/build/buildd/wine1.3-1.4/dlls/ntdll/file.c:624] in ntdll (0x0053e7f8) 3 0x7b83bef6 ReadFile+0x265(hFile=0x34, buffer=0x53e92c, bytesToRead=0x10, bytesRead=0x53e8cc, overlapped=(nil)) [/build/buildd/wine1.3-1.4/dlls/kernel32/file.c:439] in kernel32 (0x0053e888) 4 0x7ec1c27d rpcrt4_conn_np_read+0x3c(Connection=0x111bc8, buffer=0x53e92c, count=0x10) [/build/buildd/wine1.3-1.4/dlls/rpcrt4/rpc_transport.c:420] in rpcrt4 (0x0053e8d8) 5 0x7ec10ed5 RPCRT...
2004 Nov 16
0
metadata switches for ffmpeg2theora
..._video (uint8_t * data, int width, int height, +extern void theoraframes_init (theoraframes_info *info); +extern int theoraframes_add_video (theoraframes_info *info, uint8_t * data, int width, int height, int linesize,int e_o_s); -extern int theoraframes_add_audio (int16_t * readbuffer, int bytesread, +extern int theoraframes_add_audio (theoraframes_info *info, int16_t * readbuffer, int bytesread, int samplesread,int e_o_s); -extern void theoraframes_flush (int e_o_s); -extern void theoraframes_close (); +extern void theoraframes_flush (theoraframes_info *info, int e_o_s); +extern void...
2014 Dec 19
2
[LLVMdev] [Patches][RFC] What to do about bitcode streaming.
Hi Rafael, Would you mind waiting for Derek to come back from vacation to discuss this? We do use this code and could improve how it's used and tested within LLVM. Derek is the best person to discuss this, he'll be back in mid-January. Thanks, JF On Fri, Dec 19, 2014 at 6:41 AM, Rafael EspĂ­ndola < rafael.espindola at gmail.com> wrote: > > > I CC'ed llvmdev to put a