mirror of
https://github.com/LMMS/lmms.git
synced 2026-07-14 15:42:32 -04:00
Implement 24 bit support for WAV export (#3021)
Add a new value of "24 Bit Float" to the "Depth" combo box in the project export dialog. Add a new enum value to ProjectRenderer::Depth and extend the evaluation of the different enum values in ProjectRenderer. Add the new case of a depth of 24 to AudioFileWave and remove some repetition with regards to SF_FORMAT_WAV in the code. It's only set once now and then the depth is "added" in a switch statement.
This commit is contained in:
@@ -76,14 +76,30 @@ ProjectRenderer::ProjectRenderer( const Mixer::qualitySettings & _qs,
|
||||
return;
|
||||
}
|
||||
|
||||
bool success_ful = false;
|
||||
int depth;
|
||||
switch (_os.depth)
|
||||
{
|
||||
case Depth_16Bit:
|
||||
depth = 16;
|
||||
break;
|
||||
case Depth_24Bit:
|
||||
depth = 24;
|
||||
break;
|
||||
case Depth_32Bit:
|
||||
depth = 32;
|
||||
break;
|
||||
default:
|
||||
// If this line is reached the enum has been extended without taking care here
|
||||
Q_ASSERT(false);
|
||||
}
|
||||
|
||||
bool successful = false;
|
||||
m_fileDev = fileEncodeDevices[_file_format].m_getDevInst(
|
||||
_os.samplerate, DEFAULT_CHANNELS, success_ful,
|
||||
_os.samplerate, DEFAULT_CHANNELS, successful,
|
||||
_out_file, _os.vbr,
|
||||
_os.bitrate, _os.bitrate - 64, _os.bitrate + 64,
|
||||
_os.depth == Depth_32Bit ? 32 : 16,
|
||||
Engine::mixer() );
|
||||
if( success_ful == false )
|
||||
depth, Engine::mixer() );
|
||||
if( !successful )
|
||||
{
|
||||
delete m_fileDev;
|
||||
m_fileDev = NULL;
|
||||
|
||||
Reference in New Issue
Block a user