1 (* Copyright (C) Doom 2D: Forever Developers
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 3 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *)
16 {$INCLUDE ../shared/a_modes.inc}
19 interface
21 type
31 // each sound file format has its own loader
32 // TODO: maybe make TBasicSound contain an instance of its loader
33 // and add a FetchSamples method or something, for streaming shit
35 public
36 // can this loader load the sound file in Data?
38 // can this loader load the sound file at FName?
40 // load from memory
41 function Load(Data: Pointer; Len: Integer; var OutLen: Integer; var OutFmt: TSoundFormat): Pointer; virtual; abstract; overload;
42 // load from file
43 function Load(FName: string; var OutLen: Integer; var OutFmt: TSoundFormat): Pointer; virtual; abstract; overload;
44 // needed in case memory is allocated in a lib or something
53 implementation
55 var
59 var
61 begin
65 begin
67 break;
72 var
74 begin
78 begin
80 break;
85 begin