Skylicht Engine
Toggle main menu visibility
Loading...
Searching...
No Matches
AudioStream
CZipAudioFileStream.h
1
// Copyright (C) 2012 Pham Hong Duc
2
// This file is part of the "Skylicht Technologies".
3
4
#pragma once
5
6
#ifdef BUILD_SKYLICHT_AUDIO
7
8
#include "pch.h"
9
#include "Stream/IStream.h"
10
11
namespace
Skylicht
12
{
13
class
SKYLICHT_API CZipAudioFileStreamCursor :
public
Skylicht::Audio::IStreamCursor
14
{
15
protected
:
16
io::IReadFile
* m_file;
17
int
m_size;
18
int
m_pos;
19
20
unsigned
char
* m_buffer;
21
int
m_bufferSize;
22
int
m_bufferAvailableBytes;
23
int
m_bufferPos;
24
int
m_bufferOffset;
25
public
:
26
CZipAudioFileStreamCursor(
io::IReadFile
* file);
27
virtual
~CZipAudioFileStreamCursor();
28
29
virtual
int
seek
(
int
pos,
EOrigin
origin);
30
virtual
int
tell
();
31
virtual
int
read
(
unsigned
char
* buff,
int
len);
32
virtual
bool
endOfStream
();
33
virtual
int
size
();
34
virtual
bool
readyReadData
(
int
len)
35
{
36
return
true
;
37
}
38
};
39
40
class
SKYLICHT_API CZipAudioFileStream :
public
Skylicht::Audio::IStream
41
{
42
protected
:
43
std::string m_fileName;
44
io::IReadFile
* m_file;
45
int
m_size;
46
47
public
:
48
CZipAudioFileStream(
const
char
* fileName);
49
virtual
~CZipAudioFileStream();
50
51
bool
isError();
52
53
virtual
Skylicht::Audio::IStreamCursor
*
createCursor
();
54
};
55
56
}
57
58
#endif
Skylicht::Audio::IStreamCursor
Interface for a stream cursor, providing seek and read operations on an audio stream.
Definition
IStream.h:39
Skylicht::Audio::IStreamCursor::EOrigin
EOrigin
Origin for seek operations.
Definition
IStream.h:45
Skylicht::Audio::IStream
Interface for an audio data stream (File, Memory, etc.).
Definition
IStream.h:107
Skylicht::CZipAudioFileStreamCursor::seek
virtual int seek(int pos, EOrigin origin)
Move the cursor position.
Skylicht::CZipAudioFileStreamCursor::readyReadData
virtual bool readyReadData(int len)
Check if a certain amount of data is ready to be read.
Definition
CZipAudioFileStream.h:34
Skylicht::CZipAudioFileStreamCursor::size
virtual int size()
Get total size of the stream.
Skylicht::CZipAudioFileStreamCursor::endOfStream
virtual bool endOfStream()
Check if the cursor is at the end of the stream.
Skylicht::CZipAudioFileStreamCursor::read
virtual int read(unsigned char *buff, int len)
Read data from the stream.
Skylicht::CZipAudioFileStreamCursor::tell
virtual int tell()
Get current cursor position.
Skylicht::CZipAudioFileStream::createCursor
virtual Skylicht::Audio::IStreamCursor * createCursor()
Create a new cursor for this stream.
irr::io::IReadFile
Interface providing read acess to a file.
Definition
IReadFile.h:18
Skylicht
Everything in the Skylicht Engine. You can start by looking at the topics.
Definition
AudioDebugLog.h:29
Generated by
1.17.0