1 /*
2  * DSFML - The Simple and Fast Multimedia Library for D
3  *
4  * Copyright (c) 2013 - 2018 Jeremy DeHaan (dehaan.jeremiah@gmail.com)
5  *
6  * This software is provided 'as-is', without any express or implied warranty.
7  * In no event will the authors be held liable for any damages arising from the
8  * use of this software.
9  *
10  * Permission is granted to anyone to use this software for any purpose,
11  * including commercial applications, and to alter it and redistribute it
12  * freely, subject to the following restrictions:
13  *
14  * 1. The origin of this software must not be misrepresented; you must not claim
15  * that you wrote the original software. If you use this software in a product,
16  * an acknowledgment in the product documentation would be appreciated but is
17  * not required.
18  *
19  * 2. Altered source versions must be plainly marked as such, and must not be
20  * misrepresented as being the original software.
21  *
22  * 3. This notice may not be removed or altered from any source distribution
23  *
24  *
25  * DSFML is based on SFML (Copyright Laurent Gomila)
26  */
27 
28 /**
29  * $(U InputSoundFile) decodes audio samples from a sound file. It is used
30  * internally by higher-level classes such as $(SOUNDBUFFER_LINK) and
31  * $(MUSIC_LINK), but can also be useful if you want to process or analyze audio
32  * files without playing them, or if you want to implement your own version of
33  * $(MUSIC_LINK) with more specific features.
34  *
35  * Example:
36  * ---
37  * // Open a sound file
38  * auto file = new InputSoundFile();
39  * if (!file.openFromFile("music.ogg"))
40  * {
41  *      //error
42  * }
43  *
44  * // Print the sound attributes
45  * writeln("duration: ", file.getDuration().total!"seconds");
46  * writeln("channels: ", file.getChannelCount());
47  * writeln("sample rate: ", file.getSampleRate());
48  * writeln("sample count: ", file.getSampleCount());
49  *
50  * // Read and process batches of samples until the end of file is reached
51  * short samples[1024];
52  * long count;
53  * do
54  * {
55  *     count = file.read(samples, 1024);
56  *
57  *     // process, analyze, play, convert, or whatever
58  *     // you want to do with the samples...
59  * }
60  * while (count > 0);
61  * ---
62  *
63  * See_Also:
64  * $(OUTPUTSOUNDFILE_LINK)
65  */
66 module nudsfml.audio.old.inputsoundfile;
67 
68 import std.string;
69 import nudsfml.system.inputstream;
70 import nudsfml.system.err;
71 
72 import bindbc.sfml.audio;
73 
74 public import nudsfml.system.time;
75