Closed Bug 1047791 Opened 10 years ago Closed 10 years ago

content/media/AudioStream.cpp:834:100: error: no matching function for call to 'soundtouch::SoundTouch::receiveSamples(mozilla::AudioDataValue*, long int&)' when building on Debian armel

Categories

(Core :: Audio/Video, defect)

ARM
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla34
Tracking Status
firefox31 --- wontfix
firefox32 --- fixed
firefox33 --- fixed
firefox34 --- fixed
firefox-esr31 --- fixed

People

(Reporter: glandium, Assigned: glandium)

Details

Attachments

(2 files)

In file included from /«PKGBUILDDIR»/build-browser/content/media/Unified_cpp_content_media0.cpp:80:0: /«PKGBUILDDIR»/content/media/AudioStream.cpp: In member function 'long int mozilla::AudioStream::GetUnprocessed(void*, long int, int64_t&)': /«PKGBUILDDIR»/content/media/AudioStream.cpp:834:100: error: no matching function for call to 'soundtouch::SoundTouch::receiveSamples(mozilla::AudioDataValue*, long int&)' flushedFrames = mTimeStretcher->receiveSamples(reinterpret_cast<AudioDataValue*>(wpos), aFrames); ^ /«PKGBUILDDIR»/content/media/AudioStream.cpp:834:100: note: candidates are: In file included from ../../dist/include/soundtouch/SoundTouch.h:75:0, from /«PKGBUILDDIR»/content/media/AudioStream.cpp:16, from /«PKGBUILDDIR»/build-browser/content/media/Unified_cpp_content_media0.cpp:80: ../../dist/include/soundtouch/FIFOSamplePipe.h:190:18: note: virtual uint soundtouch::FIFOProcessor::receiveSamples(soundtouch::SAMPLETYPE*, uint) virtual uint receiveSamples(SAMPLETYPE *outBuffer, ///< Buffer where to copy output samples. ^ ../../dist/include/soundtouch/FIFOSamplePipe.h:190:18: note: no known conversion for argument 1 from 'mozilla::AudioDataValue* {aka float*}' to 'soundtouch::SAMPLETYPE* {aka short int*}' ../../dist/include/soundtouch/FIFOSamplePipe.h:203:18: note: virtual uint soundtouch::FIFOProcessor::receiveSamples(uint) virtual uint receiveSamples(uint maxSamples ///< Remove this many samples from the beginning of pipe. ^ ../../dist/include/soundtouch/FIFOSamplePipe.h:203:18: note: candidate expects 1 argument, 2 provided In file included from /«PKGBUILDDIR»/build-browser/content/media/Unified_cpp_content_media0.cpp:80:0: /«PKGBUILDDIR»/content/media/AudioStream.cpp: In member function 'long int mozilla::AudioStream::GetTimeStretched(void*, long int, int64_t&)': /«PKGBUILDDIR»/content/media/AudioStream.cpp:908:109: error: no matching function for call to 'soundtouch::SoundTouch::putSamples(mozilla::AudioDataValue*, uint32_t)' mTimeStretcher->putSamples(reinterpret_cast<AudioDataValue*>(input[i]), BytesToFrames(input_size[i])); ^ /«PKGBUILDDIR»/content/media/AudioStream.cpp:908:109: note: candidate is: In file included from /«PKGBUILDDIR»/content/media/AudioStream.cpp:16:0, from /«PKGBUILDDIR»/build-browser/content/media/Unified_cpp_content_media0.cpp:80: ../../dist/include/soundtouch/SoundTouch.h:236:18: note: virtual void soundtouch::SoundTouch::putSamples(const SAMPLETYPE*, uint) virtual void putSamples( ^ ../../dist/include/soundtouch/SoundTouch.h:236:18: note: no known conversion for argument 1 from 'mozilla::AudioDataValue* {aka float*}' to 'const SAMPLETYPE* {aka const short int*}' In file included from /«PKGBUILDDIR»/build-browser/content/media/Unified_cpp_content_media0.cpp:80:0: /«PKGBUILDDIR»/content/media/AudioStream.cpp:911:128: error: no matching function for call to 'soundtouch::SoundTouch::receiveSamples(mozilla::AudioDataValue*, long int)' uint32_t receivedFrames = mTimeStretcher->receiveSamples(reinterpret_cast<AudioDataValue*>(wpos), aFrames - processedFrames); ^ /«PKGBUILDDIR»/content/media/AudioStream.cpp:911:128: note: candidates are: In file included from ../../dist/include/soundtouch/SoundTouch.h:75:0, from /«PKGBUILDDIR»/content/media/AudioStream.cpp:16, from /«PKGBUILDDIR»/build-browser/content/media/Unified_cpp_content_media0.cpp:80: ../../dist/include/soundtouch/FIFOSamplePipe.h:190:18: note: virtual uint soundtouch::FIFOProcessor::receiveSamples(soundtouch::SAMPLETYPE*, uint) virtual uint receiveSamples(SAMPLETYPE *outBuffer, ///< Buffer where to copy output samples. ^ ../../dist/include/soundtouch/FIFOSamplePipe.h:190:18: note: no known conversion for argument 1 from 'mozilla::AudioDataValue* {aka float*}' to 'soundtouch::SAMPLETYPE* {aka short int*}' ../../dist/include/soundtouch/FIFOSamplePipe.h:203:18: note: virtual uint soundtouch::FIFOProcessor::receiveSamples(uint) virtual uint receiveSamples(uint maxSamples ///< Remove this many samples from the beginning of pipe. ^ ../../dist/include/soundtouch/FIFOSamplePipe.h:203:18: note: candidate expects 1 argument, 2 provided make[5]: *** [Unified_cpp_content_media0.o] Error 1
So, this is interesting. One part of the build system thinks it need to use float for audio samples, and one other part thinks it need to use uint16_t. The reason for this error is that libsoundtouch forces compilation for integers when __SOFTFP__ is defined, because they say floating point computations are too slow on soft floats. I think (but I don't have a machine to verify), that it is what is happening here. > #if (defined(__SOFTFP__)) > // For Android compilation: Force use of Integer samples in case that > // compilation uses soft-floating point emulation - soft-fp is way too slow > #undef SOUNDTOUCH_FLOAT_SAMPLES > #define SOUNDTOUCH_INTEGER_SAMPLES 1 I think the right solution here is to relax the check in configure.in: > dnl Use integers over floats for audio on B2G and Android, because audio > dnl backends for those platforms don't support floats. > if test "$OS_TARGET" = "Android"; then so that we use integers on Android OR ARM. We had problems in the past with x86 android, so we changed the test to be against Android and not ARM, but this was a terrible idea, in retrospect.
Assignee: nobody → paul
Can you try this ? It should do the trick and also is the right choice in terms of performance for this CPU.
Attachment #8466640 - Flags: feedback?(mh+mozilla)
Comment on attachment 8466640 [details] [diff] [review] Use integers for audio when on Android, or when using ARM on other OSes. r= Review of attachment 8466640 [details] [diff] [review]: ----------------------------------------------------------------- ::: configure.in @@ +5080,5 @@ > +dnl Use integers over floats for audio on B2G and Android > +dnl (regarless of the CPU architecture, because audio > +dnl backends for those platforms don't support floats. We also > +dnl use integers on ARM with other OS, because it's more efficient. > +if test "$OS_TARGET" = "Android" || test "$CPU_ARCH" = "ARM" ; then This works if you replace ARM with arm. But that also switches from libvorbis to libtremor, and breaks webm encoding as a consequence.
Attachment #8466640 - Flags: feedback?(mh+mozilla)
Please redirect to the right person if you aren't, because I couldn't find a module corresponding to non-webaudio media.
Attachment #8466724 - Flags: review?(paul)
Assignee: paul → mh+mozilla
Status: NEW → ASSIGNED
Attachment #8466724 - Flags: review?(paul) → review+
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
Whiteboard: [npotb][checkin-needed-aurora][checkin-needed-beta][checkin-needed-esr31]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: