#ifndef AVIFILE_SUNAUDIORENDERER_H
#define AVIFILE_SUNAUDIORENDERER_H

#include "IAudioRenderer.h"

class SunAudioRenderer: public IAudioRenderer
{
public:
//  void doAudioExtract(double);
    SunAudioRenderer(IAviReadStream* stream);
    ~SunAudioRenderer();
    double bufferTime();	//for how long can we play without doAudioExtract()'s?
				//restart thread if it waits
protected:
    virtual void reset();
    virtual void pause(int state);
    virtual void setVolume(float volume);
    static void* doAudioOut(void* arg);

    int m_iAudioFd;		// /dev/audio file descriptor

    uint_t m_iSamplesSent;	// number of samples written to device
    pthread_t m_AudioThread;	// Writes data to audio_fd
};

#endif // AVIFILE_SUNAUDIORENDERER_H
