Skip to content

Commit

Permalink
Demo
Browse files Browse the repository at this point in the history
  • Loading branch information
gecko0307 committed Oct 15, 2021
1 parent 986f4bf commit 0f13426
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 0 deletions.
3 changes: 3 additions & 0 deletions data/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Copyright (C) 2021 Timur Gafarov.
`music.flac` is available under Creative Commons Attribution ShareAlike 4.0.
If you create a derivative work based on `music.flac`, please, provide this file with it or include it in the documentation.
Binary file added data/music.flac
Binary file not shown.
23 changes: 23 additions & 0 deletions demo/main.d
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
module main;

import soloud;

void main()
{
loadSoloud();

Soloud soloud = Soloud.create();
soloud.init();

WavStream music = WavStream.create();
music.load("data/music.flac");
int voice = soloud.play(music);

while (soloud.getActiveVoiceCount() > 0)
{
// do nothing while music is playing...
}

music.free();
soloud.deinit();
}
6 changes: 6 additions & 0 deletions dub.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@
{
"name": "library",
"targetType": "library"
},
{
"name": "application",
"targetName": "demo",
"targetType": "executable",
"mainSourceFile": "demo/main.d"
}
],

Expand Down

0 comments on commit 0f13426

Please sign in to comment.