You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

17 lines
490 B

#pragma once
#include <QString>
#include <vector>
#include <cstdint>
#include <functional>
class QObject;
class VoicePlayer {
public:
static void playOpusFile(const QString& filePath, QObject* context, std::function<void(float)> ready);
static void cancelPending();
static bool isPreparing();
static int decodeOpusFile(const QString& filePath, std::vector<int16_t>& outPcm,
int& outSampleRate, int& outChannels, float& outDurationSec);
};