1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-11-09 12:22:34 +01:00

Moved static scale function into MADStream

This commit is contained in:
Timmy Sjöstedt 2016-05-26 17:27:45 +02:00
parent fa13ace921
commit 58fdcd47dc
2 changed files with 2 additions and 3 deletions

View File

@ -12,8 +12,6 @@
#include <iostream>
#include <rw/defines.hpp>
static inline
signed int scale(mad_fixed_t sample);
#include <vector>
@ -27,6 +25,7 @@ class MADStream : public sf::SoundStream
unsigned int mReadProgress;
std::vector<int16_t> mCurrentSamples;
static inline signed int scale(mad_fixed_t sample);
static mad_flow ms_header(void* user, mad_header const* header);
static mad_flow ms_input(void* user, mad_stream* stream);
static mad_flow ms_output(void* user, mad_header const* header, mad_pcm* pcm);

View File

@ -1,6 +1,6 @@
#include "audio/MADStream.hpp"
static inline signed int scale(mad_fixed_t sample)
inline signed int MADStream::scale(mad_fixed_t sample)
{
/* round */
sample += (1L << (MAD_F_FRACBITS - 16));