Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/lib/sound/resource_sound_buffer.h @ 10657

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

orxonox/trunk: merged the new_class_id branche back to the trunk.
merged with command:
svn merge https://svn.orxonox.net/orxonox/branches/new_class_id trunk -r9683:HEAD
no conflicts… puh..

File size: 1.3 KB
RevLine 
[9811]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{
[9847]15  class ResourceSoundBuffer : public SoundBuffer, public Resources::Resource
[9811]16  {
17    ObjectListDeclaration(ResourceSoundBuffer);
18  public:
[9854]19    ResourceSoundBuffer(const std::string& soundName,
20                        const Resources::KeepLevel& keepLevel = Resources::KeepLevel());
21    static ResourceSoundBuffer createFromString(const std::string& loadString, const Resources::KeepLevel& keepLevel = Resources::KeepLevel())
22    { return ResourceSoundBuffer(loadString, keepLevel); };
[9811]23
24  private:
25  class SoundBufferResourcePointer : public Resources::StorePointer
26    {
27    public:
28      SoundBufferResourcePointer(const std::string& loadString, const Resources::KeepLevel& keepLevel, const SoundBufferData::Pointer& data);
29      inline const SoundBufferData::Pointer& ptr() const { return pointer; }
[9846]30      virtual bool last() const { return pointer.count() == 1; }
[9811]31    private:
32      SoundBufferData::Pointer pointer;
33    };
34
35  private:
[9823]36    static Resources::tType<ResourceSoundBuffer> type;
[9811]37  };
38}
39
40
41#endif /* _RESOURCE_SOUND_BUFFER_H */
Note: See TracBrowser for help on using the repository browser.