Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEAT(client): Add MP3 Recording #6219

Merged
merged 2 commits into from
Nov 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/mumble/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,13 @@ else()
message(WARNING "libsndfile is missing Opus-support -> No Opus-format recording")
endif()

# Check if sndfile version supports mp3
if("${sndfile_VERSION}" VERSION_GREATER_EQUAL "1.1.0")
target_compile_definitions(mumble_client_object_lib PUBLIC USE_SNDFILE_MP3)
else()
message(WARNING "libsndfile is missing Mp3-support -> No Mp3-format recording")
endif()

# Look for various targets as they are named differently on different platforms
if(static AND TARGET sndfile-static)
target_link_libraries(mumble_client_object_lib PUBLIC sndfile-static)
Expand Down
20 changes: 20 additions & 0 deletions src/mumble/VoiceRecorder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,18 @@ SF_INFO VoiceRecorder::createSoundFileInfo() const {
qWarning() << "VoiceRecorder: recording started to" << m_config.fileName << "@" << m_config.sampleRate
<< "hz in OPUS format";
break;
#endif
#ifdef USE_SNDFILE_MP3
case VoiceRecorderFormat::MP3:
sfinfo.frames = 0;
sfinfo.samplerate = m_config.sampleRate;
sfinfo.channels = 1;
sfinfo.format = SF_FORMAT_MPEG | SF_FORMAT_MPEG_LAYER_III;
sfinfo.sections = 0;
sfinfo.seekable = 0;
qWarning() << "VoiceRecorder: recording started to" << m_config.fileName << "@" << m_config.sampleRate
<< "hz in MP3 format";
break;
#endif
}

Expand Down Expand Up @@ -445,6 +457,10 @@ QString VoiceRecorderFormat::getFormatDescription(VoiceRecorderFormat::Format fm
#ifdef USE_SNDFILE_OPUS
case VoiceRecorderFormat::OPUS:
return VoiceRecorder::tr(".opus - Lossy compressed");
#endif
#ifdef USE_SNDFILE_MP3
case VoiceRecorderFormat::MP3:
return VoiceRecorder::tr(".mp3 - Lossy compressed");
#endif
default:
return QString();
Expand All @@ -466,6 +482,10 @@ QString VoiceRecorderFormat::getFormatDefaultExtension(VoiceRecorderFormat::Form
#ifdef USE_SNDFILE_OPUS
case VoiceRecorderFormat::OPUS:
return QLatin1String("opus");
#endif
#ifdef USE_SNDFILE_MP3
case VoiceRecorderFormat::MP3:
return QLatin1String("mp3");
#endif
default:
return QString();
Expand Down
3 changes: 3 additions & 0 deletions src/mumble/VoiceRecorder.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ enum Format {
#ifdef USE_SNDFILE_OPUS
// OPUS Format
OPUS,
#endif
#ifdef USE_SNDFILE_MP3
MP3,
#endif
kEnd
};
Expand Down
4 changes: 4 additions & 0 deletions src/mumble/mumble_ar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8813,6 +8813,10 @@ An access token is a text string, which can be used as a password for very simpl
<source>.opus - Lossy compressed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>.mp3 - Lossy compressed</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>VoiceRecorderDialog</name>
Expand Down
4 changes: 4 additions & 0 deletions src/mumble/mumble_bg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8806,6 +8806,10 @@ An access token is a text string, which can be used as a password for very simpl
<source>.opus - Lossy compressed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>.mp3 - Lossy compressed</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>VoiceRecorderDialog</name>
Expand Down
4 changes: 4 additions & 0 deletions src/mumble/mumble_br.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8805,6 +8805,10 @@ An access token is a text string, which can be used as a password for very simpl
<source>.opus - Lossy compressed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>.mp3 - Lossy compressed</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>VoiceRecorderDialog</name>
Expand Down
4 changes: 4 additions & 0 deletions src/mumble/mumble_ca.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8831,6 +8831,10 @@ An access token is a text string, which can be used as a password for very simpl
<source>.opus - Lossy compressed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>.mp3 - Lossy compressed</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>VoiceRecorderDialog</name>
Expand Down
4 changes: 4 additions & 0 deletions src/mumble/mumble_cs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8873,6 +8873,10 @@ Znak přístupu je textový řetězec, který může být použit jako heslo pro
<source>.opus - Lossy compressed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>.mp3 - Lossy compressed</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>VoiceRecorderDialog</name>
Expand Down
4 changes: 4 additions & 0 deletions src/mumble/mumble_cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8812,6 +8812,10 @@ An access token is a text string, which can be used as a password for very simpl
<source>.opus - Lossy compressed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>.mp3 - Lossy compressed</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>VoiceRecorderDialog</name>
Expand Down
4 changes: 4 additions & 0 deletions src/mumble/mumble_da.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8867,6 +8867,10 @@ Et adgangsudtryk er en tekststreng, der kan bruges som en adgangskode for meget
<source>.opus - Lossy compressed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>.mp3 - Lossy compressed</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>VoiceRecorderDialog</name>
Expand Down
4 changes: 4 additions & 0 deletions src/mumble/mumble_de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8963,6 +8963,10 @@ Ein Zugriffscode ist eine Zeichenfolge, die als Passwort für ein sehr einfaches
<source>.opus - Lossy compressed</source>
<translation>.opus - Verlustbehaftet komprimiert</translation>
</message>
<message>
<source>.mp3 - Lossy compressed</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>VoiceRecorderDialog</name>
Expand Down
4 changes: 4 additions & 0 deletions src/mumble/mumble_el.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8970,6 +8970,10 @@ An access token is a text string, which can be used as a password for very simpl
<source>.opus - Lossy compressed</source>
<translation>.opus - συμπίεση Lossy</translation>
</message>
<message>
<source>.mp3 - Lossy compressed</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>VoiceRecorderDialog</name>
Expand Down
4 changes: 4 additions & 0 deletions src/mumble/mumble_en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8803,6 +8803,10 @@ An access token is a text string, which can be used as a password for very simpl
<source>.opus - Lossy compressed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>.mp3 - Lossy compressed</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>VoiceRecorderDialog</name>
Expand Down
4 changes: 4 additions & 0 deletions src/mumble/mumble_en_GB.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8842,6 +8842,10 @@ An access token is a text string, which can be used as a password for very simpl
<source>.opus - Lossy compressed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>.mp3 - Lossy compressed</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>VoiceRecorderDialog</name>
Expand Down
4 changes: 4 additions & 0 deletions src/mumble/mumble_eo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8817,6 +8817,10 @@ An access token is a text string, which can be used as a password for very simpl
<source>.opus - Lossy compressed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>.mp3 - Lossy compressed</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>VoiceRecorderDialog</name>
Expand Down
4 changes: 4 additions & 0 deletions src/mumble/mumble_es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8888,6 +8888,10 @@ Una credencial de acceso es una cadena de texto que puede ser usada como contras
<source>.opus - Lossy compressed</source>
<translation>.opus - Lossy comprimido</translation>
</message>
<message>
<source>.mp3 - Lossy compressed</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>VoiceRecorderDialog</name>
Expand Down
4 changes: 4 additions & 0 deletions src/mumble/mumble_et.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8806,6 +8806,10 @@ An access token is a text string, which can be used as a password for very simpl
<source>.opus - Lossy compressed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>.mp3 - Lossy compressed</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>VoiceRecorderDialog</name>
Expand Down
4 changes: 4 additions & 0 deletions src/mumble/mumble_eu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8826,6 +8826,10 @@ An access token is a text string, which can be used as a password for very simpl
<source>.opus - Lossy compressed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>.mp3 - Lossy compressed</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>VoiceRecorderDialog</name>
Expand Down
4 changes: 4 additions & 0 deletions src/mumble/mumble_fa_IR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8803,6 +8803,10 @@ An access token is a text string, which can be used as a password for very simpl
<source>.opus - Lossy compressed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>.mp3 - Lossy compressed</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>VoiceRecorderDialog</name>
Expand Down
4 changes: 4 additions & 0 deletions src/mumble/mumble_fi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8969,6 +8969,10 @@ Pääsypoletti on merkkijonoketju, jota voidaan käyttää salasanana yksinkerta
<source>.opus - Lossy compressed</source>
<translation>.opus - Häviöllisesti pakattu</translation>
</message>
<message>
<source>.mp3 - Lossy compressed</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>VoiceRecorderDialog</name>
Expand Down
4 changes: 4 additions & 0 deletions src/mumble/mumble_fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8977,6 +8977,10 @@ Un jeton d&apos;accès est une chaîne de caractères qui peut être utilisée c
<source>.opus - Lossy compressed</source>
<translation>.opus - Compressé avec perte</translation>
</message>
<message>
<source>.mp3 - Lossy compressed</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>VoiceRecorderDialog</name>
Expand Down
4 changes: 4 additions & 0 deletions src/mumble/mumble_gl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8807,6 +8807,10 @@ An access token is a text string, which can be used as a password for very simpl
<source>.opus - Lossy compressed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>.mp3 - Lossy compressed</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>VoiceRecorderDialog</name>
Expand Down
4 changes: 4 additions & 0 deletions src/mumble/mumble_he.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8864,6 +8864,10 @@ An access token is a text string, which can be used as a password for very simpl
<source>.opus - Lossy compressed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>.mp3 - Lossy compressed</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>VoiceRecorderDialog</name>
Expand Down
4 changes: 4 additions & 0 deletions src/mumble/mumble_hi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8760,6 +8760,10 @@ An access token is a text string, which can be used as a password for very simpl
<source>.opus - Lossy compressed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>.mp3 - Lossy compressed</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>VoiceRecorderDialog</name>
Expand Down
4 changes: 4 additions & 0 deletions src/mumble/mumble_hu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8860,6 +8860,10 @@ A kulcs egy szöveges karaktersorozat, amely jelszóként használható a csator
<source>.opus - Lossy compressed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>.mp3 - Lossy compressed</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>VoiceRecorderDialog</name>
Expand Down
4 changes: 4 additions & 0 deletions src/mumble/mumble_it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8910,6 +8910,10 @@ Un token di accesso è una stringa di testo, che può essere usata come password
<source>.opus - Lossy compressed</source>
<translation>.opus - Compresso lossy</translation>
</message>
<message>
<source>.mp3 - Lossy compressed</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>VoiceRecorderDialog</name>
Expand Down
4 changes: 4 additions & 0 deletions src/mumble/mumble_ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8860,6 +8860,10 @@ An access token is a text string, which can be used as a password for very simpl
<source>.opus - Lossy compressed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>.mp3 - Lossy compressed</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>VoiceRecorderDialog</name>
Expand Down
4 changes: 4 additions & 0 deletions src/mumble/mumble_ko.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8908,6 +8908,10 @@ An access token is a text string, which can be used as a password for very simpl
<source>.opus - Lossy compressed</source>
<translation>.opus - 손실 압축</translation>
</message>
<message>
<source>.mp3 - Lossy compressed</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>VoiceRecorderDialog</name>
Expand Down
4 changes: 4 additions & 0 deletions src/mumble/mumble_lt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8848,6 +8848,10 @@ Prieigos raktas yra tekstinė eilutė, kuri gali būti naudojama kaip slaptažod
<source>.opus - Lossy compressed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>.mp3 - Lossy compressed</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>VoiceRecorderDialog</name>
Expand Down
4 changes: 4 additions & 0 deletions src/mumble/mumble_nl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8910,6 +8910,10 @@ Een toegangssleutel is een tekenreeks die gebruikt kan worden als wachtwoord om
<source>.opus - Lossy compressed</source>
<translation>.opus - Verlieslijdend gecomprimeerd</translation>
</message>
<message>
<source>.mp3 - Lossy compressed</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>VoiceRecorderDialog</name>
Expand Down
4 changes: 4 additions & 0 deletions src/mumble/mumble_no.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8926,6 +8926,10 @@ Et tilgangssymbol er en tekststring, som kan brukes som et passord for veldig en
<source>.opus - Lossy compressed</source>
<translation>.opus — tapsbasert kompresjon</translation>
</message>
<message>
<source>.mp3 - Lossy compressed</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>VoiceRecorderDialog</name>
Expand Down
4 changes: 4 additions & 0 deletions src/mumble/mumble_oc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8806,6 +8806,10 @@ An access token is a text string, which can be used as a password for very simpl
<source>.opus - Lossy compressed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>.mp3 - Lossy compressed</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>VoiceRecorderDialog</name>
Expand Down
4 changes: 4 additions & 0 deletions src/mumble/mumble_pl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8972,6 +8972,10 @@ Token dostępu to ciąg tekstowy, który może służyć jako hasło do bardzo p
<source>.opus - Lossy compressed</source>
<translation>.opus - Stratna kompresja</translation>
</message>
<message>
<source>.mp3 - Lossy compressed</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>VoiceRecorderDialog</name>
Expand Down
Loading