mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-28 03:35:38 +08:00
Ref T730, code style, adding namespaces
This commit is contained in:
committed by
Mat Sutcliffe
parent
329b1e8c9a
commit
99edc9cb13
@@ -1,3 +1,13 @@
|
||||
/* Copyright (C) 2019
|
||||
* swift project Community / Contributors
|
||||
*
|
||||
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
|
||||
* directory of this distribution. No part of swift project, including this file, may be copied, modified, propagated,
|
||||
* or distributed except according to the terms contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef WAVFILE_H
|
||||
#define WAVFILE_H
|
||||
|
||||
@@ -5,24 +15,32 @@
|
||||
#include <QFile>
|
||||
#include <QAudioFormat>
|
||||
|
||||
class WavFile : public QFile
|
||||
namespace BlackSound
|
||||
{
|
||||
public:
|
||||
WavFile(QObject *parent = 0);
|
||||
namespace Wav
|
||||
{
|
||||
//! * WAV file
|
||||
class WavFile : public QFile
|
||||
{
|
||||
public:
|
||||
//! Ctor
|
||||
WavFile(QObject *parent = nullptr);
|
||||
|
||||
using QFile::open;
|
||||
bool open(const QString &fileName);
|
||||
const QAudioFormat &fileFormat() const;
|
||||
qint64 headerLength() const;
|
||||
QByteArray audioData() { return m_audioData; }
|
||||
using QFile::open;
|
||||
bool open(const QString &fileName);
|
||||
const QAudioFormat &fileFormat() const;
|
||||
qint64 headerLength() const;
|
||||
QByteArray audioData() { return m_audioData; }
|
||||
|
||||
private:
|
||||
bool readHeader();
|
||||
private:
|
||||
bool readHeader();
|
||||
|
||||
private:
|
||||
QAudioFormat m_fileFormat;
|
||||
qint64 m_headerLength;
|
||||
QByteArray m_audioData;
|
||||
};
|
||||
private:
|
||||
QAudioFormat m_fileFormat;
|
||||
qint64 m_headerLength;
|
||||
QByteArray m_audioData;
|
||||
};
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
#endif // WAVFILE_H
|
||||
#endif // guard
|
||||
|
||||
Reference in New Issue
Block a user