Newer
Older
Import / applications / HighwayDash / ports / Game / GameAudio.h
@John Ryland John Ryland on 22 Dec 2020 588 bytes import NUC files
#ifndef GAME_AUDIO_H
#define GAME_AUDIO_H


#include "AudioRenderer.h"
#include "Mp3Music.h"


class GameAudioRenderer : public AudioRenderer
{
public:
    GameAudioRenderer();
    void processMelodyChannel(size_t a_frameCount, uint16_t* a_outputBuffer, const char* a_tune, int& a_time, float a_octave=1.0, bool a_lerp=false);
    void renderSamples(void* a_outputBuffer, size_t a_frameCount) override;

    const char* m_tuneCh1;
    const char* m_tuneCh2;
    int m_sample = 0;
    int timeCh1 = 0;
    int timeCh2 = 0;
    int sign = 1;

    Mp3Music mp3;
};


#endif // GAME_AUDIO_H