|
|
|
@ -18,7 +18,11 @@
|
|
|
|
|
|
|
|
|
|
// STL includes
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
#include <conio.h>
|
|
|
|
|
#ifdef NL_OS_WINDOWS
|
|
|
|
|
# include <conio.h>
|
|
|
|
|
#else
|
|
|
|
|
# include <curses.h>
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
// NeL includes
|
|
|
|
|
#include <nel/misc/app_context.h>
|
|
|
|
@ -138,9 +142,16 @@ static void runSample()
|
|
|
|
|
printf("Press ANY other key to exit\n");
|
|
|
|
|
while (!s_AudioDecoder->isMusicEnded())
|
|
|
|
|
{
|
|
|
|
|
#ifdef NL_OS_WINDOWS
|
|
|
|
|
if (_kbhit())
|
|
|
|
|
{
|
|
|
|
|
switch (_getch())
|
|
|
|
|
#else
|
|
|
|
|
char ch;
|
|
|
|
|
if (read(0, &ch, 1))
|
|
|
|
|
{
|
|
|
|
|
switch (ch)
|
|
|
|
|
#endif
|
|
|
|
|
{
|
|
|
|
|
case '+':
|
|
|
|
|
s_GroupController->setUserGain(s_GroupController->getUserGain() + 0.1f);
|
|
|
|
@ -172,7 +183,13 @@ static void runSample()
|
|
|
|
|
|
|
|
|
|
printf("End of song\n");
|
|
|
|
|
printf("Press ANY key to exit\n");
|
|
|
|
|
while (!_kbhit()) { s_AudioMixer->update(); nlSleep(10); } _getch();
|
|
|
|
|
#ifdef NL_OS_WINDOWS
|
|
|
|
|
while (!_kbhit())
|
|
|
|
|
#else
|
|
|
|
|
char ch;
|
|
|
|
|
while (!read(0, &ch, 1))
|
|
|
|
|
#endif
|
|
|
|
|
{ s_AudioMixer->update(); nlSleep(10); }
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|