On Wed, 2003-07-23 at 18:05, Rodrigo Gómez wrote:> Hi there. > > I'm having this problem when trying to open the stream to play it. What I'm > doing is the following: > > archivo_original = fopen(Archivo.c_str(), "r");Assuming this is Windows, you need to open the file with: archivo_original = fopen(Archivo.c_str(), "rb"); The "rb" tells fopen() you want to open the file for reading in _binary_ mode. Windows otherwise will do newline translations which mess up the reading of binary data. --- Stan Seibert <p><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 'vorbis-dev-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
Hi there. I'm having this problem when trying to open the stream to play it. What I'm doing is the following: archivo_original = fopen(Archivo.c_str(), "r"); if (archivo_original == NULL) { if (EventLog) EventLog->WriteString(Format("No se pudo abrir el archivo %s", ARRAYOFCONST((Archivo)))); WaveOut->Stop(); return; } if (resultado = ov_open(archivo_original, &oggvorbis_file, NULL, 0)) { I don't know what could be wrong with the file, as I can play it without problems in Winamp, for example. Any idea of how to solve this? I can upload the file in case somebody wants to test it. Thanks, in advance Rodrigo Gómez <p><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 'vorbis-dev-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
I uploaded the file here: ftp://msa.com.mx/rgomez/20030723.ogg Any help would be great! Rodrigo Gómez "Rodrigo Gómez" <rgomez@msa.com.mx> escribió en el mensaje news:bfn0qk$tp6$1@main.gmane.org...> Hi there. > > I'm having this problem when trying to open the stream to play it. WhatI'm> doing is the following: > > archivo_original = fopen(Archivo.c_str(), "r"); > if (archivo_original == NULL) { > if (EventLog) > EventLog->WriteString(Format("No se pudo abrir el archivo %s", > ARRAYOFCONST((Archivo)))); > WaveOut->Stop(); > return; > } > > if (resultado = ov_open(archivo_original, &oggvorbis_file, NULL, 0)) { > > I don't know what could be wrong with the file, as I can play it without > problems in Winamp, for example. > > Any idea of how to solve this? I can upload the file in case somebodywants> to test it. > > Thanks, in advance > > Rodrigo Gómez > > > > --- >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'vorbis-dev-request@xiph.org'> containing only the word 'unsubscribe' in the body. No subject is needed. > Unsubscribe messages sent to the list will be ignored/filtered. ><p><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 'vorbis-dev-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
On Thursday 24 July 2003 09:05, Rodrigo Gómez wrote:> Hi there. > > I'm having this problem when trying to open the stream to play it. What I'm > doing is the following: > > archivo_original = fopen(Archivo.c_str(), "r");If you're doing this on windows, this line is wrong. By default, windows mangles files being read. You should use "rb" to correct this behaviour. Mike --- >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 'vorbis-dev-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.