Fix sample file loading on Windows
This commit is contained in:
@@ -30,22 +30,24 @@
|
||||
#include <stdint.h>
|
||||
#include "lmms_basics.h"
|
||||
|
||||
class QString;
|
||||
|
||||
class DrumSynth {
|
||||
public:
|
||||
DrumSynth() {};
|
||||
int GetDSFileSamples(const char *dsfile, int16_t *&wave, int channels, sample_rate_t Fs);
|
||||
int GetDSFileSamples(QString dsfile, int16_t *&wave, int channels, sample_rate_t Fs);
|
||||
|
||||
private:
|
||||
float LoudestEnv(void);
|
||||
int LongestEnv(void);
|
||||
void UpdateEnv(int e, long t);
|
||||
void GetEnv(int env, const char *sec, const char *key, const char *ini);
|
||||
void GetEnv(int env, const char *sec, const char *key, QString ini);
|
||||
|
||||
float waveform(float ph, int form);
|
||||
|
||||
int GetPrivateProfileString(const char *sec, const char *key, const char *def, char *buffer, int size, const char *file);
|
||||
int GetPrivateProfileInt(const char *sec, const char *key, int def, const char *file);
|
||||
float GetPrivateProfileFloat(const char *sec, const char *key, float def, const char *file);
|
||||
int GetPrivateProfileString(const char *sec, const char *key, const char *def, char *buffer, int size, QString file);
|
||||
int GetPrivateProfileInt(const char *sec, const char *key, int def, QString file);
|
||||
float GetPrivateProfileFloat(const char *sec, const char *key, float def, QString file);
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -270,15 +270,15 @@ private:
|
||||
void convertIntToFloat ( int_sample_t * & _ibuf, f_cnt_t _frames, int _channels);
|
||||
void directFloatWrite ( sample_t * & _fbuf, f_cnt_t _frames, int _channels);
|
||||
|
||||
f_cnt_t decodeSampleSF( const char * _f, sample_t * & _buf,
|
||||
f_cnt_t decodeSampleSF( QString _f, sample_t * & _buf,
|
||||
ch_cnt_t & _channels,
|
||||
sample_rate_t & _sample_rate );
|
||||
#ifdef LMMS_HAVE_OGGVORBIS
|
||||
f_cnt_t decodeSampleOGGVorbis( const char * _f, int_sample_t * & _buf,
|
||||
f_cnt_t decodeSampleOGGVorbis( QString _f, int_sample_t * & _buf,
|
||||
ch_cnt_t & _channels,
|
||||
sample_rate_t & _sample_rate );
|
||||
#endif
|
||||
f_cnt_t decodeSampleDS( const char * _f, int_sample_t * & _buf,
|
||||
f_cnt_t decodeSampleDS( QString _f, int_sample_t * & _buf,
|
||||
ch_cnt_t & _channels,
|
||||
sample_rate_t & _sample_rate );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user