Add AudioEngine with new implementation

Change-Id: I5eebe662ecbce9814ed3e763db56df9be737d11f
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
This commit is contained in:
Ling Hu
2012-01-18 17:17:54 +10:00
committed by Qt by Nokia
parent 262f397e3e
commit 809bbc35c6
39 changed files with 6592 additions and 6 deletions

View File

@@ -74,7 +74,7 @@ class QSampleCache;
class QWaveDecoder;
// Lives in application thread
class QSample : public QObject
class Q_MULTIMEDIA_EXPORT QSample : public QObject
{
Q_OBJECT
public:
@@ -127,17 +127,23 @@ private:
int m_ref;
};
class QSampleCache
class Q_MULTIMEDIA_EXPORT QSampleCache : public QObject
{
Q_OBJECT
public:
friend class QSample;
QSampleCache();
QSampleCache(QObject *parent = 0);
~QSampleCache();
QSample* requestSample(const QUrl& url);
void setCapacity(qint64 capacity);
bool isLoading() const;
Q_SIGNALS:
void isLoadingChanged();
private:
QMap<QUrl, QSample*> m_samples;
QSet<QSample*> m_staleSamples;
@@ -152,6 +158,10 @@ private:
bool notifyUnreferencedSample(QSample* sample);
void removeUnreferencedSample(QSample* sample);
void unloadSample(QSample* sample);
void loadingRelease();
int m_loadingRefCount;
QMutex m_loadingMutex;
};
QT_END_NAMESPACE