Initial support for WAV parsing

This commit is contained in:
Joshua Granick
2014-07-28 21:27:21 -07:00
parent d8a0eed472
commit b55c191e04
10 changed files with 408 additions and 215 deletions

View File

@@ -2,6 +2,30 @@
#define LIME_AUDIO_SOUND_H
#include <hx/CFFI.h>
#include <utils/ByteArray.h>
#ifdef ANDROID
#include <android/log.h>
#endif
#ifdef ANDROID
#define LOG_SOUND(args,...) ELOG(args, ##__VA_ARGS__)
#else
#ifdef IPHONE
//#define LOG_SOUND(args,...) printf(args, ##__VA_ARGS__)
#define LOG_SOUND(args...) { }
#elif defined(TIZEN)
#include <FBase.h>
#define LOG_SOUND(args,...) AppLog(args, ##__VA_ARGS__)
#else
#define LOG_SOUND(args,...) printf(args, ##__VA_ARGS__)
#endif
#endif
//#define LOG_SOUND(args...) { }
namespace lime {
@@ -10,6 +34,20 @@ namespace lime {
public:
Sound ();
~Sound ();
value Value ();
int bitsPerSample;
int channels;
int sampleRate;
ByteArray *data;
private:
value mValue;
};