Go Back   FlashFXP Forums > > > >

Suggestions Got a new idea or addition which would benefit IOFTPD? Post it here!

Reply
 
Thread Tools Rate Thread Display Modes
Old 09-25-2002, 11:11 AM   #1
treech
Junior Member
 
Join Date: Sep 2002
Posts: 1
Default suggestion for Project-ZS 1.0

OGG support would be nice, i'll paste some simple example code:

void Oggtag(FILE *fp)
{
OggVorbis_File vf;
double duration;
long bitrate;

if ( ov_open (fp, &vf, NULL, 0 ) != 0 )
printf("Something went wrong!\n");

duration = ov_time_total ( &vf, -1 );
bitrate = ov_bitrate ( &vf, -1 ) / 1000;

{
char **ptr = ov_comment(&vf,-1)->user_comments;
vorbis_info *vi = ov_info(&vf,-1);
printf("\n\nBitstream is %d channel, %ldHz\n",vi->channels,vi->rate);
printf("Encoded by: %s\n\n",ov_comment(&vf,-1)->vendor);
printf("Bitrate: %d Kbit/Sec\n", bitrate);
printf("Duration: %.0f Seconds\n", duration);
printf("\n\t---------- Vorbis Tag: ----------\n\n");

while(*ptr)
{
printf("%s\n",*ptr);
++ptr;
}
}
ov_clear (&vf);
}

very simple, you will of course need the ogg/vorbis/vorbisfile libraries install. (and link to the libraries, -lvorbisfile -lvorbis)
treech is offline   Reply With Quote
Reply

Tags
&vf, bitrate;, duration;, libraries, simple


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 04:46 AM.

Parts of this site powered by vBulletin Mods & Addons from DragonByte Technologies Ltd. (Details)