2014-03-22 15:29:21 +01:00
|
|
|
// Copyright (c) 2014, Thomas Goyne <plorkyeran@aegisub.org>
|
2006-04-14 04:51:37 +02:00
|
|
|
//
|
2014-03-22 15:29:21 +01:00
|
|
|
// Permission to use, copy, modify, and distribute this software for any
|
|
|
|
// purpose with or without fee is hereby granted, provided that the above
|
|
|
|
// copyright notice and this permission notice appear in all copies.
|
2006-04-14 04:51:37 +02:00
|
|
|
//
|
2014-03-22 15:29:21 +01:00
|
|
|
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
|
|
// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
|
|
// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
|
|
// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
|
|
// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
|
|
// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
|
|
// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
2006-04-14 04:51:37 +02:00
|
|
|
//
|
2009-07-29 07:43:02 +02:00
|
|
|
// Aegisub Project http://www.aegisub.org/
|
|
|
|
|
2009-09-11 04:36:34 +02:00
|
|
|
#include "include/aegisub/audio_provider.h"
|
2006-04-14 04:51:37 +02:00
|
|
|
|
2011-09-28 21:49:37 +02:00
|
|
|
namespace agi {
|
|
|
|
class BackgroundRunner;
|
2014-03-22 15:29:21 +01:00
|
|
|
class temp_file_mapping;
|
2011-09-28 21:49:37 +02:00
|
|
|
}
|
2011-09-28 21:47:40 +02:00
|
|
|
|
2014-03-13 02:39:07 +01:00
|
|
|
class HDAudioProvider final : public AudioProviderWrapper {
|
2014-03-22 15:29:21 +01:00
|
|
|
std::unique_ptr<agi::temp_file_mapping> file;
|
2011-09-28 21:47:40 +02:00
|
|
|
|
2013-11-21 18:13:36 +01:00
|
|
|
void FillBuffer(void *buf, int64_t start, int64_t count) const override;
|
2012-08-18 05:13:44 +02:00
|
|
|
|
2006-04-14 04:51:37 +02:00
|
|
|
public:
|
2013-09-16 15:43:17 +02:00
|
|
|
HDAudioProvider(std::unique_ptr<AudioProvider> source, agi::BackgroundRunner *br);
|
2006-04-14 04:51:37 +02:00
|
|
|
~HDAudioProvider();
|
|
|
|
};
|