diff --git a/sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/files/IPCMFile.cpp b/sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/files/IPCMFile.cpp index 5c5fa78c..e3ff017c 100644 --- a/sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/files/IPCMFile.cpp +++ b/sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/files/IPCMFile.cpp @@ -30,7 +30,7 @@ namespace HyperSonicDrivers::files m_sound = std::make_shared( group, m_channels == 2, - m_freq, + m_sampleRate, size, data ); diff --git a/sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/files/IPCMFile.hpp b/sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/files/IPCMFile.hpp index e464a879..cd343b8e 100644 --- a/sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/files/IPCMFile.hpp +++ b/sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/files/IPCMFile.hpp @@ -18,7 +18,7 @@ namespace HyperSonicDrivers::files virtual ~IPCMFile() = default; inline int getChannels() const noexcept { return m_channels; }; - inline uint32_t getSampleRate() const noexcept { return m_freq; }; + inline uint32_t getSampleRate() const noexcept { return m_sampleRate; }; inline uint8_t getBitsDepth() const noexcept { return m_bitsDepth; }; inline uint32_t getDataSize() const noexcept { return m_dataSize; }; inline std::shared_ptr getData() const noexcept { return m_data; }; @@ -26,7 +26,7 @@ namespace HyperSonicDrivers::files protected: int m_channels = 0; - uint32_t m_freq = 0; + uint32_t m_sampleRate = 0; uint8_t m_bitsDepth = 0; uint32_t m_dataSize = 0; std::shared_ptr m_data; diff --git a/sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/files/VOCFile.cpp b/sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/files/VOCFile.cpp index b6b8f75a..59abe0f2 100644 --- a/sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/files/VOCFile.cpp +++ b/sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/files/VOCFile.cpp @@ -74,9 +74,9 @@ namespace HyperSonicDrivers::files // channels default = 1 // timeConstant = 65536 - (256000000 / (channels * sampleRate); // sampleRate = 256000000 / ((65536 - (timeConstant<<8))*channels) - m_freq = 256000000L / ((65536 - (timeConstant << 8)) * m_channels); + m_sampleRate = 256000000L / ((65536 - (timeConstant << 8)) * m_channels); //m_sampleRate = 1000000 / (256 - timeConstant); - assertValid_(m_freq == (1000000 / (256 - timeConstant))); + assertValid_(m_sampleRate == (1000000 / (256 - timeConstant))); // pack Method switch (packMethod) { @@ -137,7 +137,7 @@ namespace HyperSonicDrivers::files case 9: // extended 2 { assertValid_(m_version >= 0x0114); - m_freq = db.data[0] + (db.data[1] << 8) + (db.data[2] << 16) + (db.data[3] << 24); + m_sampleRate = db.data[0] + (db.data[1] << 8) + (db.data[2] << 16) + (db.data[3] << 24); m_bitsDepth = db.data[4]; m_channels = db.data[5]; uint16_t format = db.data[6] + (db.data[7] << 8); diff --git a/sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/files/WAVFile.cpp b/sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/files/WAVFile.cpp index 0215db78..ace1ced6 100644 --- a/sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/files/WAVFile.cpp +++ b/sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/files/WAVFile.cpp @@ -175,7 +175,7 @@ namespace HyperSonicDrivers::files m_expDataChunk = true; m_bitsDepth = static_cast(m_fmt_chunk.bitsPerSample); m_channels = m_fmt_chunk.channels; - m_freq = m_fmt_chunk.samplesPerSec; + m_sampleRate = m_fmt_chunk.samplesPerSec; return true; }