/* TODO: find a way to set these from the outside */
int swf_mp3_samplerate = 44100;
int swf_mp3_channels = 1;
/* TODO: find a way to set these from the outside */
int swf_mp3_samplerate = 44100;
int swf_mp3_channels = 1;
lame_set_quality(lame_flags, 0);
lame_set_mode(lame_flags, MONO/*3*/);
lame_set_quality(lame_flags, 0);
lame_set_mode(lame_flags, MONO/*3*/);
//lame_set_compression_ratio(lame_flags, 11.025);
lame_set_bWriteVbrTag(lame_flags, 0);
//lame_set_compression_ratio(lame_flags, 11.025);
lame_set_bWriteVbrTag(lame_flags, 0);
if(first) {
int fs = lame_get_framesize(lame_flags);
//printf("framesize:%d\n", fs);
if(first) {
int fs = lame_get_framesize(lame_flags);
//printf("framesize:%d\n", fs);
blocks = num / (blocksize);
swf_SetU8(tag,(compression<<4)|(rate<<2)|(size<<1)|type);
blocks = num / (blocksize);
swf_SetU8(tag,(compression<<4)|(rate<<2)|(size<<1)|type);
void swf_SetSoundInfo(TAG*tag, SOUNDINFO*info)
{
U8 flags = (info->stop?SOUNDINFO_STOP:0)
void swf_SetSoundInfo(TAG*tag, SOUNDINFO*info)
{
U8 flags = (info->stop?SOUNDINFO_STOP:0)
|(info->envelopes?SOUNDINFO_HASENVELOPE:0)
|(info->loops?SOUNDINFO_HASLOOPS:0)
|(info->outpoint?SOUNDINFO_HASOUTPOINT:0)
|(info->envelopes?SOUNDINFO_HASENVELOPE:0)
|(info->loops?SOUNDINFO_HASLOOPS:0)
|(info->outpoint?SOUNDINFO_HASOUTPOINT:0)