diff options
author | Chris Apers | 2004-11-09 10:45:47 +0000 |
---|---|---|
committer | Chris Apers | 2004-11-09 10:45:47 +0000 |
commit | 618971dd2fbee8b075b7c888f3abdff8aba47897 (patch) | |
tree | 50350983581f5ba727b372d6dca7b611dcef3994 /backends/PalmOS/Src/init_pa1lib.cpp | |
parent | 463544099832fd8af37b813afc7c3fffc96e78aa (diff) | |
download | scummvm-rg350-618971dd2fbee8b075b7c888f3abdff8aba47897.tar.gz scummvm-rg350-618971dd2fbee8b075b7c888f3abdff8aba47897.tar.bz2 scummvm-rg350-618971dd2fbee8b075b7c888f3abdff8aba47897.zip |
Gathered common functions into new source files
svn-id: r15743
Diffstat (limited to 'backends/PalmOS/Src/init_pa1lib.cpp')
-rw-r--r-- | backends/PalmOS/Src/init_pa1lib.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/backends/PalmOS/Src/init_pa1lib.cpp b/backends/PalmOS/Src/init_pa1lib.cpp new file mode 100644 index 0000000000..bae109264f --- /dev/null +++ b/backends/PalmOS/Src/init_pa1lib.cpp @@ -0,0 +1,32 @@ +#include <PalmOS.h> +#include <Sonyclie.h> + +#include "pa1lib.h" +#include "init_pa1lib.h" + +void *sndStateOnFuncP = NULL; +void *sndStateOffFuncP = NULL; + +#define SndStateOn(a,b,c) if (sndStateOnFuncP)((sndStateOnType)(sndStateOnFuncP))(a, b, c); +#define SndStateOff(a) if (sndStateOffFuncP)((sndStateOffType)(sndStateOffFuncP))(a); + +void Pa1libInit() { + Pa1Lib_Open(); + + // Doesn't work on T4xx and T6xx series ? + FtrGet(sonySysFtrCreatorSystem, sonySysFtrNumSystemAOutSndStateOnHandlerP, (UInt32*) &sndStateOnFuncP); + FtrGet(sonySysFtrCreatorSystem, sonySysFtrNumSystemAOutSndStateOffHandlerP, (UInt32*) &sndStateOffFuncP); + + SndStateOn(aOutSndKindSp, 31, 31); + SndStateOn(aOutSndKindHp, 31, 31); + + Pa1Lib_devHpVolume(31, 31); + Pa1Lib_devSpVolume(31); +} + +void Pa1libRelease() { + SndStateOff(aOutSndKindSp); + SndStateOff(aOutSndKindHp); + + Pa1Lib_Close(); +}
\ No newline at end of file |