Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/new_class_id/src/lib/sound/resource_sound_buffer.h @ 9847

Last change on this file since 9847 was 9847, checked in by bensch, 18 years ago

renamed NewResource to Resource

File size: 1.2 KB
Line 
1/*!
2 * @file resource_sound_buffer.h
3 * @brief Contains the ResourceSoundBuffer class, that handles the Resource-specific loading part of the SoundBuffer.
4 *
5 */
6
7#ifndef _RESOURCE_SOUND_BUFFER_H
8#define _RESOURCE_SOUND_BUFFER_H
9
10#include "util/loading/resource.h"
11#include "sound_buffer.h"
12
13namespace OrxSound
14{
15  class ResourceSoundBuffer : public SoundBuffer, public Resources::Resource
16  {
17    ObjectListDeclaration(ResourceSoundBuffer);
18  public:
19    ResourceSoundBuffer(const std::string& soundName);
20    static ResourceSoundBuffer createFromString(const std::string& loadString) { return ResourceSoundBuffer(loadString); };
21
22  private:
23  class SoundBufferResourcePointer : public Resources::StorePointer
24    {
25    public:
26      SoundBufferResourcePointer(const std::string& loadString, const Resources::KeepLevel& keepLevel, const SoundBufferData::Pointer& data);
27      inline const SoundBufferData::Pointer& ptr() const { return pointer; }
28      virtual bool last() const { return pointer.count() == 1; }
29    private:
30      SoundBufferData::Pointer pointer;
31    };
32
33  private:
34    static Resources::tType<ResourceSoundBuffer> type;
35  };
36}
37
38
39#endif /* _RESOURCE_SOUND_BUFFER_H */
Note: See TracBrowser for help on using the repository browser.