aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llaudio/llvorbisencode.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/llaudio/llvorbisencode.h (renamed from linden/indra/llaudio/vorbisencode.h)11
1 files changed, 11 insertions, 0 deletions
diff --git a/linden/indra/llaudio/vorbisencode.h b/linden/indra/llaudio/llvorbisencode.h
index ff5ce3a..2825a30 100644
--- a/linden/indra/llaudio/vorbisencode.h
+++ b/linden/indra/llaudio/llvorbisencode.h
@@ -45,6 +45,17 @@ const S32 LLVORBISENC_UNSUPPORTED_SAMPLE_RATE = 8; // unsupported sample ra
45const S32 LLVORBISENC_UNSUPPORTED_WORD_SIZE = 9; // unsupported word size 45const S32 LLVORBISENC_UNSUPPORTED_WORD_SIZE = 9; // unsupported word size
46const S32 LLVORBISENC_CLIP_TOO_LONG = 10; // source file is too long 46const S32 LLVORBISENC_CLIP_TOO_LONG = 10; // source file is too long
47 47
48const F32 LLVORBIS_CLIP_MAX_TIME = 10.0f;
49const U8 LLVORBIS_CLIP_MAX_CHANNELS = 2;
50const U32 LLVORBIS_CLIP_SAMPLE_RATE = 44100;
51const U32 LLVORBIS_CLIP_MAX_SAMPLES_PER_CHANNEL = (U32)(LLVORBIS_CLIP_MAX_TIME * LLVORBIS_CLIP_SAMPLE_RATE);
52const U32 LLVORBIS_CLIP_MAX_SAMPLES = LLVORBIS_CLIP_MAX_SAMPLES_PER_CHANNEL * LLVORBIS_CLIP_MAX_CHANNELS;
53const size_t LLVORBIS_CLIP_MAX_SAMPLE_DATA = LLVORBIS_CLIP_MAX_SAMPLES * 2; // 2 = 16-bit
54
55// Treat anything this long as a bad asset. A little fudge factor at the end:
56// Make that a lot of fudge factor. We're allowing 30 sec for now - 3x legal upload
57const size_t LLVORBIS_CLIP_REJECT_SAMPLES = LLVORBIS_CLIP_MAX_SAMPLES * 3;
58const size_t LLVORBIS_CLIP_REJECT_SIZE = LLVORBIS_CLIP_MAX_SAMPLE_DATA * 3;
48 59
49S32 check_for_invalid_wav_formats(const std::string& in_fname, std::string& error_msg); 60S32 check_for_invalid_wav_formats(const std::string& in_fname, std::string& error_msg);
50S32 encode_vorbis_file(const std::string& in_fname, const std::string& out_fname); 61S32 encode_vorbis_file(const std::string& in_fname, const std::string& out_fname);