From 7c020abf511236e2c56fa1c6b6c1b8f248aa8582 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 29 Apr 2016 03:41:11 +0300 Subject: Add name into memory usage tree for SDLMusic and SoundEffect. --- src/resources/soundeffect.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/resources/soundeffect.h') diff --git a/src/resources/soundeffect.h b/src/resources/soundeffect.h index a8e11ca6b..20861f218 100644 --- a/src/resources/soundeffect.h +++ b/src/resources/soundeffect.h @@ -50,7 +50,8 @@ class SoundEffect final : public Resource * @return NULL if the an error occurred, a valid pointer * otherwise. */ - static Resource *load(SDL_RWops *const rw); + static Resource *load(SDL_RWops *const rw, + const std::string &name); /** * Plays the sample. @@ -67,15 +68,21 @@ class SoundEffect final : public Resource int calcMemoryLocal() const override final; + std::string getCounterName() const override final + { return mName; } + protected: /** * Constructor. */ - explicit SoundEffect(Mix_Chunk *const soundEffect) : + SoundEffect(Mix_Chunk *const soundEffect, + const std::string &name) : Resource(), + mName(name), mChunk(soundEffect) { } + std::string mName; Mix_Chunk *mChunk; }; -- cgit v1.2.3-70-g09d2