~riccetn/aegisub/trunk

« back to all changes in this revision

Viewing changes to src/audio_provider_ram.h

  • Committer: plorkyeran
  • Date: 2012-08-18 03:13:44 UTC
  • Revision ID: svn-v4:93549f3f-7f0a-0410-a4b3-e966c9c94f04:trunk/aegisub:6960
Factor out bounds-checking for GetAudio to a single place

It was being done in inconsistent ways in several places, which did not
include all of the places it needed to be done.

Closes #1509.

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
 
59
59
        void Clear();
60
60
        void FillCache(AudioProvider *source, agi::ProgressSink *ps);
 
61
        void FillBuffer(void *buf, int64_t start, int64_t count) const;
61
62
 
62
63
public:
63
64
        RAMAudioProvider(AudioProvider *source, agi::BackgroundRunner *br);
64
65
        ~RAMAudioProvider();
65
66
 
66
67
        bool AreSamplesNativeEndian() const { return samples_native_endian; }
67
 
        void GetAudio(void *buf, int64_t start, int64_t count) const;
68
68
};