git.asbjorn.biz
/
swftools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ec14091
)
allow to set samplerate/channels from outside.
author
kramm
<kramm>
Sat, 22 Feb 2003 20:21:56 +0000
(20:21 +0000)
committer
kramm
<kramm>
Sat, 22 Feb 2003 20:21:56 +0000
(20:21 +0000)
lib/modules/swfsound.c
patch
|
blob
|
history
diff --git
a/lib/modules/swfsound.c
b/lib/modules/swfsound.c
index
d0bfc20
..
2209d85
100644
(file)
--- a/
lib/modules/swfsound.c
+++ b/
lib/modules/swfsound.c
@@
-70,15
+70,19
@@
void swf_SetSoundStreamBlock(TAG*tag, S16*samples, int numsamples, char first)
#ifdef LAME
#include "../lame/lame.h"
#ifdef LAME
#include "../lame/lame.h"
-
+
+/* TODO: find a way to set these from the outside */
+int swf_mp3_samplerate = 44100;
+int swf_mp3_channels = 1;
+
static lame_global_flags*lame_flags;
static void initlame(unsigned char*buf, int bufsize)
{
lame_flags = lame_init();
static lame_global_flags*lame_flags;
static void initlame(unsigned char*buf, int bufsize)
{
lame_flags = lame_init();
- lame_set_in_samplerate(lame_flags, 44100);
- lame_set_num_channels(lame_flags, 1);
+ lame_set_in_samplerate(lame_flags, swf_mp3_samplerate);
+ lame_set_num_channels(lame_flags, swf_mp3_channels);
lame_set_scale(lame_flags, 0);
// MPEG1 32, 44.1, 48khz
lame_set_scale(lame_flags, 0);
// MPEG1 32, 44.1, 48khz