[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1051573: bambootracker: FTBFS with RtAudio 6



Source: bambootracker
Version: 0.6.1-1
Severity: serious
Tags: ftbfs patch
Justification: fails to build from source (but built successfully in the past)

Dear Maintainer,

bambootracker ftbfs with RtAudio 6 (currently found in experimental).

```
g++ -c -pipe -g -O2 -ffile-prefix-map=/build/bambootracker-CzYJbF/bambootracker-0.6.1=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -std=gnu++1y -pthread -pthread -Wall -Wextra -Wall -Wextra -Werror -pedantic -pedantic-errors -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -D__LINUX_ALSA__ -D__LINUX_PULSE__ -D__UNIX_JACK__ -D_REENTRANT -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -Iinstrument -Imodule -I../submodules/emu2149/src -I/usr/include/rtaudio -I/usr/include/rtmidi -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o audio_stream_rtaudio.o audio/audio_stream_rtaudio.cpp
audio/audio_stream_rtaudio.cpp: In member function ‘virtual bool AudioStreamRtAudio::initialize(uint32_t, uint32_t, uint32_t, const QString&, const QString&, QString*)’:
audio/audio_stream_rtaudio.cpp:82:16: error: ‘RtAudioError’ does not name a type; did you mean ‘RtAudioErrorType’?
   82 |         catch (RtAudioError& error) {
      |                ^~~~~~~~~~~~
      |                RtAudioErrorType
audio/audio_stream_rtaudio.cpp:83:17: error: ‘error’ was not declared in this scope; did you mean ‘perror’?
   83 |                 error.printMessage();
      |                 ^~~~~
      |                 perror
make: *** [Makefile:4064: audio_stream_rtaudio.o] Error 1
```

Attached is a patch that fixes the FTBFS (but is otherwise untested).
No debdiff this time, sorry.

cheers.
Description: Fix FTBFS with RtAudio6
 Replace try/catch with check for return code
Author: IOhannes m zmölnig
Origin: Debian
Forwarded: no
Last-Update: 2023-09-09
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
Index: bambootracker-0.6.1/BambooTracker/audio/audio_stream_rtaudio.cpp
===================================================================
--- bambootracker-0.6.1.orig/BambooTracker/audio/audio_stream_rtaudio.cpp
+++ bambootracker-0.6.1/BambooTracker/audio/audio_stream_rtaudio.cpp
@@ -73,16 +73,15 @@ bool AudioStreamRtAudio::initialize(uint
 
 	unsigned int bufferSize = rate * duration / 1000;
 	bool isSuccessed = false;
-	try {
-		audio->openStream(&param, nullptr, RTAUDIO_SINT16, rate, &bufferSize, callback, this, &opts);
 		if (errDetail) *errDetail = "";
-		isSuccessed = true;
-		rate = audio->getStreamSampleRate();	// Match to real rate (for ALSA)
-	}
-	catch (RtAudioError& error) {
-		error.printMessage();
-		if (errDetail) *errDetail = QString::fromStdString(error.getMessage());
-	}
+		if (audio->openStream(&param, nullptr, RTAUDIO_SINT16, rate, &bufferSize, callback, this, &opts)) {
+			std::string err = audio->getErrorText();
+			std::cerr << err << std::endl;
+			if (errDetail) *errDetail = QString::fromStdString(err);
+		} else {
+		    isSuccessed = true;
+		    rate = audio->getStreamSampleRate();	// Match to real rate (for ALSA)
+		}
 
 	AudioStream::initialize(rate, duration, intrRate, backend, device);
 	return isSuccessed;

Reply to: