equal
deleted
inserted
replaced
313 const DevSoundCapabilities &caps) { |
313 const DevSoundCapabilities &caps) { |
314 TMMFCapabilities formatNative; |
314 TMMFCapabilities formatNative; |
315 TUint32 fourCC; |
315 TUint32 fourCC; |
316 |
316 |
317 bool result = false; |
317 bool result = false; |
318 if (formatQt.codec() == "audio/pcm" && |
318 if (formatQt.codec() == QString::fromAscii("audio/pcm") && |
319 formatQtToNative(formatQt, fourCC, formatNative)) { |
319 formatQtToNative(formatQt, fourCC, formatNative)) { |
320 result = |
320 result = |
321 (formatNative.iRate & caps.caps().iRate) |
321 (formatNative.iRate & caps.caps().iRate) |
322 && (formatNative.iChannels & caps.caps().iChannels) |
322 && (formatNative.iChannels & caps.caps().iChannels) |
323 && (caps.fourCC().Find(fourCC) != KErrNotFound); |
323 && (caps.fourCC().Find(fourCC) != KErrNotFound); |
335 // TInt, rather than MMF enumerated types. |
335 // TInt, rather than MMF enumerated types. |
336 TMMFSampleRate outputSampleRate; |
336 TMMFSampleRate outputSampleRate; |
337 TMMFMonoStereo outputChannels; |
337 TMMFMonoStereo outputChannels; |
338 TMMFSoundEncoding outputEncoding; |
338 TMMFSoundEncoding outputEncoding; |
339 |
339 |
340 if (inputFormat.codec() == "audio/pcm") { |
340 if (inputFormat.codec() == QString::fromAscii("audio/pcm")) { |
341 result = |
341 result = |
342 sampleRateQtToNative(inputFormat.frequency(), outputSampleRate) |
342 sampleRateQtToNative(inputFormat.frequency(), outputSampleRate) |
343 && channelsQtToNative(inputFormat.channels(), outputChannels) |
343 && channelsQtToNative(inputFormat.channels(), outputChannels) |
344 && sampleInfoQtToNative(inputFormat.sampleSize(), |
344 && sampleInfoQtToNative(inputFormat.sampleSize(), |
345 inputFormat.byteOrder(), |
345 inputFormat.byteOrder(), |