3 Copyright (C) 2005 and later Cockos Incorporated
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
22 This file provides a simple interface for using lame_enc/libmp3lame MP3 encoding
27 #ifndef _LAMEENCDEC_H_
28 #define _LAMEENCDEC_H_
31 #include "wdlstring.h"
37 LameEncoder(int srate
, int nch
, int bitrate
, int stereomode
= 1, int quality
= 2, int vbrmethod
= -1, int vbrquality
= 2, int vbrmax
= 320, int abr
= 128);
40 int Status() { return errorstat
; } // 1=no dll, 2=error
42 void Encode(float *in
, int in_spls
, int spacing
=1);
48 spltmp
[0].Advance(spltmp
[0].Available());
50 spltmp
[1].Advance(spltmp
[1].Available());
54 static const char *GetInfo();
55 static const char *GetLibName();
56 static int CheckDLL(); // returns >0 if DLL present, 1 for lame, 2 for old bladeenc
57 static void InitDLL(const char *extrapath
=NULL
, bool forceRetry
=false); // call with extrapath != NULL if you want to try loading from another path
59 void SetVBRFilename(const char *fn
)
64 int GetNumChannels() { return m_encoder_nch
; }
73 int m_nch
,m_encoder_nch
;