[Vorbis] Problem with VorbisEncoder

Ian Malone ibm21 at cam.ac.uk
Thu Jan 12 04:32:18 PST 2006


pavan kumar wrote:
> Hi,
> Thanks for the info. I have checked for alternative endian also. The 
> result is same. I am pasting the code i have written. It differs from 
> the example code only when we read/write the data from/to the file. 
> Symbian file read - write APIs support only descriptors.
> It would be helpful if you can point out whether i am missing somewhere 
> in the below code. This code generates the ogg with more of noise but 
> some music somewhere in the background. Same file goldwav converts 
> properly into an oggfile. does any one have a working example code, I 
> would be grateful if you can send me as soon as possible.
>  

<snip>

I haven't cmped them, but your code looks the same as the encoder to
me, except I have no experience with the symbian platform, so I'll
have to take your word for it that the IO is equivalent to what's in
the example.  For the same reason I don't have any code that will
work on it.

The only other thing I can suggest (given that you can hear some music)
is corruption of the wav on the way in.  Does the Symbian read API have
a text mode that might be responsible?  Does converting the output of
the following portion back into integer format (and putting the header
back on) rather than encoding it give something close to the original
wav?  Is it possible the test file is unsigned int?

>      
>       /* uninterleave samples */
>       for(i=0;i<bytes/4;i++){
>  buffer[0][i]=((readBuffer[i*4+1]<<8)|
>         (0x00ff&(int)readBuffer[i*4]))/32768.f;
>  buffer[1][i]=((readBuffer[i*4+3]<<8)|
>         (0x00ff&(int)readBuffer[i*4+2]))/32768.f;
>       }

> 

Sorry, that's about all I can do.
-- 
imalone


More information about the Vorbis mailing list