mirror of https://github.com/odrling/Aegisub
Simplify AudioSpectrumCacheBlockFactory a little
This commit is contained in:
parent
7a3110015e
commit
641f1e2e81
|
@ -54,10 +54,6 @@ struct AudioSpectrumCacheBlockFactory {
|
||||||
/// Pointer back to the owning spectrum renderer
|
/// Pointer back to the owning spectrum renderer
|
||||||
AudioSpectrumRenderer *spectrum;
|
AudioSpectrumRenderer *spectrum;
|
||||||
|
|
||||||
/// @brief Constructor
|
|
||||||
/// @param s The owning spectrum renderer
|
|
||||||
AudioSpectrumCacheBlockFactory(AudioSpectrumRenderer *s) : spectrum(s) { }
|
|
||||||
|
|
||||||
/// @brief Allocate and fill a data block
|
/// @brief Allocate and fill a data block
|
||||||
/// @param i Index of the block to produce data for
|
/// @param i Index of the block to produce data for
|
||||||
/// @return Newly allocated and filled block
|
/// @return Newly allocated and filled block
|
||||||
|
@ -83,8 +79,7 @@ class AudioSpectrumCache
|
||||||
: public DataBlockCache<float, 10, AudioSpectrumCacheBlockFactory> {
|
: public DataBlockCache<float, 10, AudioSpectrumCacheBlockFactory> {
|
||||||
public:
|
public:
|
||||||
AudioSpectrumCache(size_t block_count, AudioSpectrumRenderer *renderer)
|
AudioSpectrumCache(size_t block_count, AudioSpectrumRenderer *renderer)
|
||||||
: DataBlockCache<float, 10, AudioSpectrumCacheBlockFactory>(
|
: DataBlockCache(block_count, AudioSpectrumCacheBlockFactory{renderer})
|
||||||
block_count, AudioSpectrumCacheBlockFactory(renderer))
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue