[vorbis] Questions about libvorbisenc

Peron, Stéphane stephane.peron at dcmc.creditlyonnais.fr
Tue Feb 26 08:05:12 PST 2002



> Brief description:
> 
> When you open the input file, you need to find out how long it is (in
> seconds, or in samples - either is easy).
> 
        Well .. I am sorry ... I don't know anything in vorbis .....
        In the example, is corresponding to the variable  i in the beginning
of the code ? :

        for (i=0, founddata=0; i<30 && ! feof(stdin) && ! ferror(stdin);
i++)
          {
            fread(readbuffer,1,2,stdin);

            if ( ! strncmp(readbuffer, "da", 2) )
            {
              founddata = 1;
              fread(readbuffer,1,6,stdin);
              break;
            }
          }

<p>> For figuring out how far through the file you are, then, you just need
> to track how many samples you've encoded (where 'encoding' in this context
> means submitting to libvorbis to encode). The percent done is then
> samples_submitted/total_samples.
> 
        Ok .. Is "samples_submitted" correponding to variable i in the main
loop ? :
        for (i=0, founddata=0; i<30 && ! feof(stdin) && ! ferror(stdin);
i++)
          {
            fread(readbuffer,1,2,stdin);

            if ( ! strncmp(readbuffer, "da", 2) )
            {
              founddata = 1;
              fread(readbuffer,1,6,stdin);
              break;
            }
          }

        Sorry for these questions of a beginner using vorbis libraries....

        Many Thanks

        Stéphane PERON 





<p>Ce message contient des informations confidentielles ou appartenant au 
Crédit Lyonnais et est établi à l'intention exclusive de ses 
destinataires. Toute divulgation, utilisation, diffusion ou reproduction 
(totale ou partielle) de ce message, ou des informations qu'il contient, 
doit être préalablement autorisée. Tout message électronique est 
susceptible d'altération et son intégrité ne peut être assurée. 
Le Crédit Lyonnais décline toute responsabilité au titre de ce 
message s'il a été modifié ou falsifié. Si vous n'êtes pas 
destinataire de ce message, merci de le détruire immédiatement et 
d'avertir l'expéditeur de l'erreur de distribution et de la destruction
du message.

This e-mail contains confidential information or information belonging 
to Crédit Lyonnais and is intended solely for the addressees. 
The unauthorised disclosure, use, dissemination or copying (either whole 
or partial) of this e-mail, or any information it contains, is prohibited.
E-mails are susceptible to alteration and their integrity cannot be guaranteed. 
Crédit Lyonnais shall not be liable for this e-mail if modified or falsified.
If you are not the intended recipient of this e-mail, please delete it 
immediately from your system and notify the sender of the wrong delivery 
and the mail deletion.

<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-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Vorbis mailing list