2012-09-23 19:16:30 +03:00
|
|
|
#ifndef _inthread__hpp__included__
|
|
|
|
#define _inthread__hpp__included__
|
|
|
|
|
|
|
|
#include <list>
|
|
|
|
#include <cstdint>
|
|
|
|
#include <string>
|
2014-11-17 15:55:14 +02:00
|
|
|
#include "library/command.hpp"
|
2012-09-23 19:16:30 +03:00
|
|
|
|
2014-05-31 13:58:17 +03:00
|
|
|
class emulator_dispatch;
|
|
|
|
|
2014-05-24 11:56:48 +03:00
|
|
|
namespace settingvar
|
|
|
|
{
|
|
|
|
class group;
|
|
|
|
}
|
|
|
|
|
2014-05-10 13:12:42 +03:00
|
|
|
class voice_commentary
|
2012-11-23 03:03:42 +02:00
|
|
|
{
|
2014-05-10 13:12:42 +03:00
|
|
|
public:
|
|
|
|
enum external_stream_format
|
|
|
|
{
|
|
|
|
EXTFMT_SOX,
|
|
|
|
EXTFMT_OGGOPUS
|
|
|
|
};
|
2012-11-23 03:03:42 +02:00
|
|
|
|
2014-05-10 13:12:42 +03:00
|
|
|
struct playback_stream_info
|
|
|
|
{
|
|
|
|
uint64_t id;
|
|
|
|
uint64_t base;
|
|
|
|
uint64_t length;
|
|
|
|
};
|
2012-09-23 19:16:30 +03:00
|
|
|
|
2014-11-17 15:55:14 +02:00
|
|
|
voice_commentary(settingvar::group& _settings, emulator_dispatch& _dispatch, audioapi_instance& _audio,
|
|
|
|
command::group& _cmd);
|
2014-05-10 13:12:42 +03:00
|
|
|
~voice_commentary();
|
|
|
|
void init();
|
|
|
|
void kill();
|
|
|
|
void frame_number(uint64_t newframe, double rate);
|
|
|
|
bool collection_loaded();
|
|
|
|
std::list<playback_stream_info> get_stream_info();
|
|
|
|
void play_stream(uint64_t id);
|
|
|
|
void export_stream(uint64_t id, const std::string& filename, external_stream_format fmt);
|
|
|
|
uint64_t import_stream(uint64_t ts, const std::string& filename, external_stream_format fmt);
|
|
|
|
void delete_stream(uint64_t id);
|
|
|
|
void export_superstream(const std::string& filename);
|
|
|
|
void load_collection(const std::string& filename);
|
|
|
|
void unload_collection();
|
|
|
|
void alter_timebase(uint64_t id, uint64_t ts);
|
|
|
|
uint64_t parse_timebase(const std::string& n);
|
|
|
|
double ts_seconds(uint64_t ts);
|
|
|
|
float get_gain(uint64_t id);
|
|
|
|
void set_gain(uint64_t id, float gain);
|
|
|
|
void set_active_flag(bool flag);
|
|
|
|
private:
|
|
|
|
void* internal;
|
2014-05-24 11:56:48 +03:00
|
|
|
settingvar::group& settings;
|
2014-05-31 13:58:17 +03:00
|
|
|
emulator_dispatch& edispatch;
|
2014-06-07 17:33:03 +03:00
|
|
|
audioapi_instance& audio;
|
2014-11-17 15:55:14 +02:00
|
|
|
command::group& cmd;
|
|
|
|
command::_fnptr<> tangentp;
|
|
|
|
command::_fnptr<> tangentr;
|
2014-05-10 13:12:42 +03:00
|
|
|
};
|
2012-09-23 19:16:30 +03:00
|
|
|
|
|
|
|
#endif
|