Quellcode durchsuchen

fix sample rate missing

mikymod vor 12 Jahren
Ursprung
Commit
8c4bd69d41
2 geänderte Dateien mit 2 neuen und 0 gelöschten Zeilen
  1. 1 0
      tools/compilers/wav/WAVCompiler.cpp
  2. 1 0
      tools/core/formats/SoundFormat.h

+ 1 - 0
tools/compilers/wav/WAVCompiler.cpp

@@ -69,6 +69,7 @@ size_t WAVCompiler::compile_impl(const char* resource_path)
 
 	m_sound_header.version = SOUND_VERSION;
 	m_sound_header.size = m_wav_header.data_size;
+	m_sound_header.sample_rate = m_wav_header.fmt_sample_rate;
 	m_sound_header.channels = m_wav_header.fmt_channels;
 	m_sound_header.bits_per_sample = m_wav_header.fmt_bits_per_sample;
 

+ 1 - 0
tools/core/formats/SoundFormat.h

@@ -37,6 +37,7 @@ struct SoundHeader
 {
 	uint32_t	version;	// Sound file version
 	uint32_t	size;
+	uint32_t	sample_rate;
 	uint32_t	channels;
 	uint32_t 	bits_per_sample;
 };