btrfs: Attempt to fix GCC2 build.
[haiku.git] / src / apps / mediaplayer / media_node_framework / audio / AudioVolumeConverter.h
blobf030a946ae6d69eb1acd38c3f20fb860a214e89d
1 /*
2 * Copyright 2008 Stephan Aßmus <superstippi@gmx.de>
3 * All rights reserved. Distributed under the terms of the MIT licensce.
4 */
5 #ifndef AUDIO_VOLUME_CONVERTER_H
6 #define AUDIO_VOLUME_CONVERTER_H
9 /*! This AudioReader just filters the volume. It depends on floating point
10 * audio format.
14 #include "AudioReader.h"
17 class AudioVolumeConverter : public AudioReader {
18 public:
19 AudioVolumeConverter(AudioReader* source,
20 float volume = 1.0);
21 virtual ~AudioVolumeConverter();
23 virtual bigtime_t InitialLatency() const;
24 virtual status_t Read(void* buffer, int64 pos, int64 frames);
26 virtual status_t InitCheck() const;
28 AudioReader* Source() const;
30 void SetVolume(float volume);
31 float Volume() const;
33 protected:
34 AudioReader* fSource;
35 float fVolume;
36 float fPreviousVolume;
39 #endif // AUDIO_VOLUME_CONVERTER_H