a couple fixes
- fix export targets of mpg123 - initialize wavFormat - fix format string localization - fix certain settings being visible in per-chip export when they shouldn't
This commit is contained in:
parent
ce6e949188
commit
ffb89ece04
3 changed files with 28 additions and 22 deletions
8
extern/mpg123/CMakeLists.txt
vendored
8
extern/mpg123/CMakeLists.txt
vendored
|
|
@ -15,10 +15,10 @@ include(GNUInstallDirs)
|
|||
set(PACKAGE_VERSION ${PROJECT_VERSION})
|
||||
add_subdirectory("src")
|
||||
|
||||
install(
|
||||
EXPORT targets
|
||||
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
|
||||
NAMESPACE MPG123::)
|
||||
#install(
|
||||
# EXPORT targets
|
||||
# DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
|
||||
# NAMESPACE MPG123::)
|
||||
|
||||
configure_package_config_file(
|
||||
mpg123-config.cmake.in mpg123-config.cmake
|
||||
|
|
|
|||
|
|
@ -139,6 +139,7 @@ struct DivAudioExportOptions {
|
|||
mode(DIV_EXPORT_MODE_ONE),
|
||||
format(DIV_EXPORT_FORMAT_WAV),
|
||||
bitRateMode(DIV_EXPORT_BITRATE_CONSTANT),
|
||||
wavFormat(DIV_EXPORT_WAV_S16),
|
||||
sampleRate(44100),
|
||||
chans(2),
|
||||
loops(0),
|
||||
|
|
|
|||
|
|
@ -24,18 +24,20 @@
|
|||
#include <imgui.h>
|
||||
|
||||
const char* audioExportFormats[]={
|
||||
_("Wave"),
|
||||
_("Opus"),
|
||||
_("FLAC (Free Lossless Audio Codec)"),
|
||||
_("Vorbis"),
|
||||
_("MP3")
|
||||
_N("Wave"),
|
||||
_N("Opus"),
|
||||
_N("FLAC (Free Lossless Audio Codec)"),
|
||||
_N("Vorbis"),
|
||||
_N("MP3"),
|
||||
NULL
|
||||
};
|
||||
|
||||
const char* audioExportWavFormats[]={
|
||||
_("Unsigned 8-bit"),
|
||||
_("Signed 16-bit"),
|
||||
_("Signed 32-bit"),
|
||||
_("Float 32-bit"),
|
||||
_N("8-bit int (unsigned)"),
|
||||
_N("16-bit int"),
|
||||
_N("32-bit int"),
|
||||
_N("32-bit float"),
|
||||
NULL
|
||||
};
|
||||
|
||||
void FurnaceGUI::drawExportAudio(bool onWindow) {
|
||||
|
|
@ -58,14 +60,17 @@ void FurnaceGUI::drawExportAudio(bool onWindow) {
|
|||
ImGui::Unindent();
|
||||
|
||||
if (audioExportOptions.mode!=DIV_EXPORT_MODE_MANY_SYS) {
|
||||
if (ImGui::BeginCombo(_("File Format"), audioExportFormats[audioExportOptions.format])) {
|
||||
for (size_t i=0; i<(supportsMP3?5:4); i++) {
|
||||
if (ImGui::Selectable(audioExportFormats[i],audioExportOptions.format==i)) {
|
||||
audioExportOptions.format=(DivAudioExportFormats)i;
|
||||
if (ImGui::BeginCombo(_("File Format"), audioExportFormats[audioExportOptions.format])) {
|
||||
for (size_t i=0; i<(supportsMP3?5:4); i++) {
|
||||
if (ImGui::Selectable(_(audioExportFormats[i]),audioExportOptions.format==i)) {
|
||||
audioExportOptions.format=(DivAudioExportFormats)i;
|
||||
}
|
||||
}
|
||||
ImGui::EndCombo();
|
||||
}
|
||||
ImGui::EndCombo();
|
||||
}
|
||||
} else {
|
||||
audioExportOptions.format=DIV_EXPORT_FORMAT_WAV;
|
||||
audioExportOptions.wavFormat=DIV_EXPORT_WAV_S16;
|
||||
}
|
||||
|
||||
bool rateCheck=(
|
||||
|
|
@ -142,10 +147,10 @@ void FurnaceGUI::drawExportAudio(bool onWindow) {
|
|||
if (audioExportOptions.bitRate<minBitRate) audioExportOptions.bitRate=minBitRate;
|
||||
if (audioExportOptions.bitRate>maxBitRate) audioExportOptions.bitRate=maxBitRate;
|
||||
}
|
||||
} else {
|
||||
} else if (audioExportOptions.mode!=DIV_EXPORT_MODE_MANY_SYS) {
|
||||
if (ImGui::BeginCombo(_("Format"), audioExportWavFormats[audioExportOptions.wavFormat])) {
|
||||
for (size_t i=0; i<4; i++) {
|
||||
if (ImGui::Selectable(audioExportWavFormats[i], audioExportOptions.wavFormat==i)) {
|
||||
for (size_t i=0; audioExportWavFormats[i]; i++) {
|
||||
if (ImGui::Selectable(_(audioExportWavFormats[i]), audioExportOptions.wavFormat==i)) {
|
||||
audioExportOptions.wavFormat=(DivAudioExportWavFormats)i;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue