TwlIPL/build/systemMenu_RED/Launcher/ARM9/src/sound.h
yutaka 1b321cadab 属性変更 (subversionの設定をちゃんとしましょう)
git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@612 b08762b0-b915-fc4b-9d8c-17b2551a87ff
2008-02-07 09:51:53 +00:00

82 lines
2.1 KiB
C

/*---------------------------------------------------------------------------*
Project: TwlIPL
File: sound.h
Copyright 2007 Nintendo. All rights reserved.
These coded instructions, statements, and computer programs contain
proprietary information of Nintendo of America Inc. and/or Nintendo
Company Ltd., and are protected by Federal copyright law. They may
not be disclosed to third parties or copied or duplicated in any form,
in whole or in part, without the prior written consent of Nintendo.
$Date:: $
$Rev$
$Author$
*---------------------------------------------------------------------------*/
#ifndef __LAUNCHER_SOUND_H__
#define __LAUNCHER_SOUND_H__
#include <twl.h>
#ifdef __cplusplus
extern "C" {
#endif
// define data-------------------------------------------------------
#define MAKE_FOURCC(cc1, cc2, cc3, cc4) (u32)((cc1) | (cc2 << 8) | (cc3 << 16) | (cc4 << 24))
#define FOURCC_RIFF MAKE_FOURCC('R', 'I', 'F', 'F')
#define FOURCC_WAVE MAKE_FOURCC('W', 'A', 'V', 'E')
#define FOURCC_fmt MAKE_FOURCC('f', 'm', 't', ' ')
#define FOURCC_data MAKE_FOURCC('d', 'a', 't', 'a')
#define L_CHANNEL 4
#define R_CHANNEL 5
#define ALARM_NUM 0
#define STREAM_THREAD_PRIO 12
#define THREAD_STACK_SIZE 1024
#define STRM_BUF_PAGESIZE 1024*32
#define STRM_BUF_SIZE STRM_BUF_PAGESIZE*2
// WAVフォーマットヘッダ
typedef struct WaveFormat
{
u16 format;
u16 channels;
s32 sampleRate;
u32 dataRate;
u16 blockAlign;
u16 bitPerSample;
}
WaveFormat;
// ストリームオブジェクト
typedef struct StreamInfo
{
FSFile file;
WaveFormat format;
u32 beginPos;
s32 dataSize;
u32 bufPage;
BOOL isPlay;
}
StreamInfo;
// global variables--------------------------------------------------
// function----------------------------------------------------------
void PlayStream(StreamInfo * strm, const char *filename);
void StopStream(StreamInfo * strm);
void StrmThread(void *arg);
#ifdef __cplusplus
}
#endif
#endif // __LAUNCHER_H__