summaryrefslogtreecommitdiffstats
path: root/src/multimedia
diff options
context:
space:
mode:
Diffstat (limited to 'src/multimedia')
-rw-r--r--src/multimedia/audio/qaudio_mac.cpp4
-rw-r--r--src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp10
-rw-r--r--src/multimedia/audio/qaudiodeviceinfo_mac_p.cpp8
-rw-r--r--src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp8
-rw-r--r--src/multimedia/audio/qaudioformat.cpp9
-rw-r--r--src/multimedia/audio/qaudioformat.h6
-rw-r--r--src/multimedia/audio/qaudioinput.cpp4
-rw-r--r--src/multimedia/audio/qaudiooutput.cpp4
8 files changed, 19 insertions, 34 deletions
diff --git a/src/multimedia/audio/qaudio_mac.cpp b/src/multimedia/audio/qaudio_mac.cpp
index 61a00ce..f6c4c02 100644
--- a/src/multimedia/audio/qaudio_mac.cpp
+++ b/src/multimedia/audio/qaudio_mac.cpp
@@ -64,8 +64,8 @@ QAudioFormat toQAudioFormat(AudioStreamBasicDescription const& sf)
{
QAudioFormat audioFormat;
- audioFormat.setSampleRate(sf.mSampleRate);
- audioFormat.setChannelCount(sf.mChannelsPerFrame);
+ audioFormat.setFrequency(sf.mSampleRate);
+ audioFormat.setChannels(sf.mChannelsPerFrame);
audioFormat.setSampleSize(sf.mBitsPerChannel);
audioFormat.setCodec(QString::fromLatin1("audio/pcm"));
audioFormat.setByteOrder(sf.mFormatFlags & kLinearPCMFormatFlagIsBigEndian != 0 ? QAudioFormat::BigEndian : QAudioFormat::LittleEndian);
diff --git a/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp b/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp
index a77a428..ee1b775 100644
--- a/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp
+++ b/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp
@@ -78,20 +78,20 @@ QAudioFormat QAudioDeviceInfoInternal::preferredFormat() const
{
QAudioFormat nearest;
if(mode == QAudio::AudioOutput) {
- nearest.setSampleRate(44100);
- nearest.setChannelCount(2);
+ nearest.setFrequency(44100);
+ nearest.setChannels(2);
nearest.setByteOrder(QAudioFormat::LittleEndian);
nearest.setSampleType(QAudioFormat::SignedInt);
nearest.setSampleSize(16);
nearest.setCodec(QLatin1String("audio/pcm"));
} else {
- nearest.setSampleRate(8000);
- nearest.setChannelCount(1);
+ nearest.setFrequency(8000);
+ nearest.setChannels(1);
nearest.setSampleType(QAudioFormat::UnSignedInt);
nearest.setSampleSize(8);
nearest.setCodec(QLatin1String("audio/pcm"));
if(!testSettings(nearest)) {
- nearest.setChannelCount(2);
+ nearest.setChannels(2);
nearest.setSampleSize(16);
nearest.setSampleType(QAudioFormat::SignedInt);
}
diff --git a/src/multimedia/audio/qaudiodeviceinfo_mac_p.cpp b/src/multimedia/audio/qaudiodeviceinfo_mac_p.cpp
index 9334069..ecd03e5 100644
--- a/src/multimedia/audio/qaudiodeviceinfo_mac_p.cpp
+++ b/src/multimedia/audio/qaudiodeviceinfo_mac_p.cpp
@@ -144,10 +144,10 @@ QAudioFormat QAudioDeviceInfoInternal::nearestFormat(const QAudioFormat& format)
rc.setCodec(QString::fromLatin1("audio/pcm"));
- if (rc.sampleRate() != target.sampleRate())
- rc.setSampleRate(target.sampleRate());
- if (rc.channelCount() != target.channelCount())
- rc.setChannelCount(target.channelCount());
+ if (rc.frequency() != target.frequency())
+ rc.setFrequency(target.frequency());
+ if (rc.channels() != target.channels())
+ rc.setChannels(target.channels());
if (rc.sampleSize() != target.sampleSize())
rc.setSampleSize(target.sampleSize());
if (rc.byteOrder() != target.byteOrder())
diff --git a/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp b/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp
index 373e23d..f2423f8 100644
--- a/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp
+++ b/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp
@@ -94,15 +94,15 @@ QAudioFormat QAudioDeviceInfoInternal::preferredFormat() const
{
QAudioFormat nearest;
if(mode == QAudio::AudioOutput) {
- nearest.setSampleRate(44100);
- nearest.setChannelCount(2);
+ nearest.setFrequency(44100);
+ nearest.setChannels(2);
nearest.setByteOrder(QAudioFormat::LittleEndian);
nearest.setSampleType(QAudioFormat::SignedInt);
nearest.setSampleSize(16);
nearest.setCodec(QLatin1String("audio/pcm"));
} else {
- nearest.setSampleRate(11025);
- nearest.setChannelCount(1);
+ nearest.setFrequency(11025);
+ nearest.setChannels(1);
nearest.setByteOrder(QAudioFormat::LittleEndian);
nearest.setSampleType(QAudioFormat::SignedInt);
nearest.setSampleSize(8);
diff --git a/src/multimedia/audio/qaudioformat.cpp b/src/multimedia/audio/qaudioformat.cpp
index 58bb571..3b06b9a 100644
--- a/src/multimedia/audio/qaudioformat.cpp
+++ b/src/multimedia/audio/qaudioformat.cpp
@@ -263,15 +263,6 @@ int QAudioFormat::frequency() const
Sets the channel count to \a channels.
*/
-void QAudioFormat::setChannelCount(int channels)
-{
- d->channels = channels;
-}
-
-/*!
- \internal
-*/
-
void QAudioFormat::setChannels(int channels)
{
d->channels = channels;
diff --git a/src/multimedia/audio/qaudioformat.h b/src/multimedia/audio/qaudioformat.h
index b255907..cb58d1c 100644
--- a/src/multimedia/audio/qaudioformat.h
+++ b/src/multimedia/audio/qaudioformat.h
@@ -76,12 +76,6 @@ public:
void setFrequency(int frequency);
int frequency() const;
- void setSampleRate(int samplerate);
- int sampleRate() const;
-
- void setChannelCount(int channels);
- int channelCount() const;
-
void setChannels(int channels);
int channels() const;
diff --git a/src/multimedia/audio/qaudioinput.cpp b/src/multimedia/audio/qaudioinput.cpp
index da39c4a..45cafc1 100644
--- a/src/multimedia/audio/qaudioinput.cpp
+++ b/src/multimedia/audio/qaudioinput.cpp
@@ -88,8 +88,8 @@ QT_BEGIN_NAMESPACE
QAudioFormat format;
// set up the format you want, eg.
- format.setSampleRate(8000);
- format.setChannelCount(1);
+ format.setFrequency(8000);
+ format.setChannels(1);
format.setSampleSize(8);
format.setCodec("audio/pcm");
format.setByteOrder(QAudioFormat::LittleEndian);
diff --git a/src/multimedia/audio/qaudiooutput.cpp b/src/multimedia/audio/qaudiooutput.cpp
index b61aa4f..afd8a84 100644
--- a/src/multimedia/audio/qaudiooutput.cpp
+++ b/src/multimedia/audio/qaudiooutput.cpp
@@ -83,8 +83,8 @@ QT_BEGIN_NAMESPACE
QAudioFormat format;
// Set up the format, eg.
- format.setSampleRate(8000);
- format.setChannelCount(1);
+ format.setFrequency(8000);
+ format.setChannels(1);
format.setSampleSize(8);
format.setCodec("audio/pcm");
format.setByteOrder(QAudioFormat::LittleEndian);