mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-12 23:35:33 +08:00
Ref T730, CPP check issues fixed
This commit is contained in:
committed by
Mat Sutcliffe
parent
1d9cd50463
commit
30baa12a86
@@ -21,20 +21,19 @@ namespace BlackSound
|
||||
{
|
||||
namespace SampleProvider
|
||||
{
|
||||
CResourceSound::CResourceSound()
|
||||
CResourceSound::CResourceSound() : m_data(new CResourceSoundData)
|
||||
{
|
||||
m_data = new CResourceSoundData;
|
||||
// void
|
||||
}
|
||||
|
||||
CResourceSound::CResourceSound(const QString &audioFileName)
|
||||
CResourceSound::CResourceSound(const QString &audioFileName) : m_data(new CResourceSoundData)
|
||||
{
|
||||
m_data = new CResourceSoundData;
|
||||
m_data->fileName = audioFileName;
|
||||
}
|
||||
|
||||
bool CResourceSound::load()
|
||||
{
|
||||
if (m_data->fileName.isEmpty()) { return false; }
|
||||
if (!m_data || m_data->fileName.isEmpty()) { return false; }
|
||||
|
||||
CWavFile wavFile;
|
||||
m_data->samples.clear();
|
||||
|
||||
@@ -27,8 +27,8 @@ namespace BlackSound
|
||||
//! CResourceSound shared data
|
||||
struct CResourceSoundData : public QSharedData
|
||||
{
|
||||
QString fileName; //!< file name
|
||||
bool isLoaded = false; //!< is audio loaded
|
||||
QString fileName; //!< file name
|
||||
bool isLoaded = false; //!< is audio loaded
|
||||
QVector<float> samples; //!< audio samples
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user