From: TravisCI-DocBuilder Date: Wed, 21 Oct 2015 06:04:55 +0000 (+0000) Subject: Doc generated from commit 89fc70f076222691a604aba7d2cae05254e413d1 X-Git-Url: https://chaos.moe/g/?a=commitdiff_plain;h=7498986dfbe15c65ebb885f777e65f5fb29ec1e4;p=corbenik%2Fctrulib.git Doc generated from commit 89fc70f076222691a604aba7d2cae05254e413d1 --- diff --git a/annotated.html b/annotated.html index 0303fa7..1e1b9d9 100644 --- a/annotated.html +++ b/annotated.html @@ -127,7 +127,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');  CMapEventEvent relating to the mapping of memory  CMemInfoMemory information  CmvdstdConfigProcessing configuration - CndspAdpcmData + CndspAdpcmDataADPCM data  CndspWaveBufWave buffer struct  COutputStringEventEvent relating to debug output  CPageInfoMemory page information diff --git a/apt_8h.html b/apt_8h.html index 39e1411..5e0da18 100644 --- a/apt_8h.html +++ b/apt_8h.html @@ -195,43 +195,43 @@ Enumerations } App status values. More...
  -enum  {
-  APTSIGNAL_HOMEBUTTON = 1, +enum  {
+  APTSIGNAL_HOMEBUTTON = 1,
-  APTSIGNAL_PREPARESLEEP = 3, +  APTSIGNAL_PREPARESLEEP = 3,
-  APTSIGNAL_ENTERSLEEP = 5, +  APTSIGNAL_ENTERSLEEP = 5,
-  APTSIGNAL_WAKEUP = 6, +  APTSIGNAL_WAKEUP = 6,
-  APTSIGNAL_ENABLE = 7, +  APTSIGNAL_ENABLE = 7,
-  APTSIGNAL_POWERBUTTON = 8, +  APTSIGNAL_POWERBUTTON = 8,
-  APTSIGNAL_UTILITY = 9, +  APTSIGNAL_UTILITY = 9,
-  APTSIGNAL_SLEEPSYSTEM = 10, +  APTSIGNAL_SLEEPSYSTEM = 10,
-  APTSIGNAL_ERROR = 11 +  APTSIGNAL_ERROR = 11
- } APT signals. More...
-  + } APT signals. More...
+  -enum  {
-  APTHOOK_ONSUSPEND = 0, +enum  {
+  APTHOOK_ONSUSPEND = 0,
-  APTHOOK_ONRESTORE, +  APTHOOK_ONRESTORE,
-  APTHOOK_ONSLEEP, +  APTHOOK_ONSLEEP,
-  APTHOOK_ONWAKEUP, +  APTHOOK_ONWAKEUP,
-  APTHOOK_ONEXIT, +  APTHOOK_ONEXIT,
-  APTHOOK_COUNT +  APTHOOK_COUNT
- } APT hook types. More...
-  + } APT hook types. More...

Detailed Description

APT (Applet) service.

Enumeration Type Documentation

- +

@@ -411,7 +411,7 @@ Variables

@@ -421,40 +421,31 @@ Variables
-

APT signals.

+

APT hook types.

- - - - - - - - -
Enumerator
APTSIGNAL_HOMEBUTTON  -

Home button pressed.

-
APTSIGNAL_PREPARESLEEP  -

Prepare to enter sleep mode.

-
APTSIGNAL_ENTERSLEEP  -

Enter sleep mode.

-
APTSIGNAL_WAKEUP  -

Wake from sleep mode.

+
Enumerator
APTHOOK_ONSUSPEND  +

App suspended.

APTSIGNAL_ENABLE  -

Enable.

+
APTHOOK_ONRESTORE  +

App restored.

APTSIGNAL_POWERBUTTON  -

Power button pressed.

+
APTHOOK_ONSLEEP  +

App sleeping.

APTSIGNAL_UTILITY  -

Utility called.

+
APTHOOK_ONWAKEUP  +

App waking up.

APTSIGNAL_SLEEPSYSTEM  -

System sleeping.

+
APTHOOK_ONEXIT  +

App exiting.

APTSIGNAL_ERROR  -

Error occurred.

+
APTHOOK_COUNT  +

Number of APT hook types.

- +
@@ -464,25 +455,34 @@ Variables
-

APT hook types.

+

APT signals.

- - - - - - + + +
Enumerator
APTHOOK_ONSUSPEND  -

App suspended.

+
Enumerator
APTSIGNAL_HOMEBUTTON  +

Home button pressed.

APTHOOK_ONRESTORE  -

App restored.

+
APTSIGNAL_PREPARESLEEP  +

Prepare to enter sleep mode.

APTHOOK_ONSLEEP  -

App sleeping.

+
APTSIGNAL_ENTERSLEEP  +

Enter sleep mode.

APTHOOK_ONWAKEUP  -

App waking up.

+
APTSIGNAL_WAKEUP  +

Wake from sleep mode.

APTHOOK_ONEXIT  -

App exiting.

+
APTSIGNAL_ENABLE  +

Enable.

APTHOOK_COUNT  -

Number of APT hook types.

+
APTSIGNAL_POWERBUTTON  +

Power button pressed.

+
APTSIGNAL_UTILITY  +

Utility called.

+
APTSIGNAL_SLEEPSYSTEM  +

System sleeping.

+
APTSIGNAL_ERROR  +

Error occurred.

diff --git a/apt_8h_source.html b/apt_8h_source.html index dc5076c..be0a886 100644 --- a/apt_8h_source.html +++ b/apt_8h_source.html @@ -145,28 +145,28 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
53 
54 /// APT signals.
55 enum {
-
56  APTSIGNAL_HOMEBUTTON = 1, ///< Home button pressed.
+
56  APTSIGNAL_HOMEBUTTON = 1, ///< Home button pressed.
57  // 2: sleep-mode related?
-
58  APTSIGNAL_PREPARESLEEP = 3, ///< Prepare to enter sleep mode.
+
58  APTSIGNAL_PREPARESLEEP = 3, ///< Prepare to enter sleep mode.
59  // 4: triggered when ptm:s GetShellStatus() returns 5.
-
60  APTSIGNAL_ENTERSLEEP = 5, ///< Enter sleep mode.
-
61  APTSIGNAL_WAKEUP = 6, ///< Wake from sleep mode.
-
62  APTSIGNAL_ENABLE = 7, ///< Enable.
-
63  APTSIGNAL_POWERBUTTON = 8, ///< Power button pressed.
-
64  APTSIGNAL_UTILITY = 9, ///< Utility called.
-
65  APTSIGNAL_SLEEPSYSTEM = 10, ///< System sleeping.
-
66  APTSIGNAL_ERROR = 11 ///< Error occurred.
+
60  APTSIGNAL_ENTERSLEEP = 5, ///< Enter sleep mode.
+
61  APTSIGNAL_WAKEUP = 6, ///< Wake from sleep mode.
+
62  APTSIGNAL_ENABLE = 7, ///< Enable.
+
63  APTSIGNAL_POWERBUTTON = 8, ///< Power button pressed.
+
64  APTSIGNAL_UTILITY = 9, ///< Utility called.
+
65  APTSIGNAL_SLEEPSYSTEM = 10, ///< System sleeping.
+
66  APTSIGNAL_ERROR = 11 ///< Error occurred.
67 };
68 
69 /// APT hook types.
70 enum {
-
71  APTHOOK_ONSUSPEND = 0, ///< App suspended.
-
72  APTHOOK_ONRESTORE, ///< App restored.
-
73  APTHOOK_ONSLEEP, ///< App sleeping.
-
74  APTHOOK_ONWAKEUP, ///< App waking up.
-
75  APTHOOK_ONEXIT, ///< App exiting.
+
71  APTHOOK_ONSUSPEND = 0, ///< App suspended.
+
72  APTHOOK_ONRESTORE, ///< App restored.
+
73  APTHOOK_ONSLEEP, ///< App sleeping.
+
74  APTHOOK_ONWAKEUP, ///< App waking up.
+
75  APTHOOK_ONEXIT, ///< App exiting.
76 
-
77  APTHOOK_COUNT, ///< Number of APT hook types.
+
77  APTHOOK_COUNT, ///< Number of APT hook types.
78 };
79 
80 /// APT hook function.
@@ -543,11 +543,12 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
451 Result APT_StartSystemApplet(NS_APPID appID, u32 bufSize, Handle applHandle, u8 *buf);
452 
Application.
Definition: apt.h:29
+
App sleeping.
Definition: apt.h:73
Amiibo settings applet (cabinet)
Definition: apt.h:28
aptHookFn callback
Hook callback.
Definition: apt.h:87
+
App exiting.
Definition: apt.h:75
Result APT_IsRegistered(NS_APPID appID, u8 *out)
Gets whether an application is registered.
Result APT_ReplySleepQuery(NS_APPID appID, u32 a)
Replies to a sleep query.
-
System sleeping.
Definition: apt.h:65
s32 Result
Function result.
Definition: types.h:43
Result APT_DoAppJump(u32 NSbuf0Size, u32 NSbuf1Size, u8 *NSbuf0Ptr, u8 *NSbuf1Ptr)
Performs an application jump.
void aptOpenSession(void)
Opens an APT session.
@@ -555,30 +556,32 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
void aptSignalReadyForSleep(void)
Signals that the app is ready to sleep.
Result APT_Enable(u32 a)
Enables APT.
bool aptMainLoop(void)
Processes the current APT status.
+
Utility called.
Definition: apt.h:64
SNOTE_AP.
Definition: apt.h:34
uint16_t u16
16-bit unsigned integer
Definition: types.h:23
+
Number of APT hook types.
Definition: apt.h:77
+
App waking up.
Definition: apt.h:74
extrapad
Definition: apt.h:37
-
App suspended.
Definition: apt.h:71
Result aptInit(void)
Initializes APT.
void aptHook(aptHookCookie *cookie, aptHookFn callback, void *param)
Sets up an APT status hook.
App running.
Definition: apt.h:44
-
Power button pressed.
Definition: apt.h:63
+
Home button pressed.
Definition: apt.h:56
Friends List applet.
Definition: apt.h:21
-
Enable.
Definition: apt.h:62
Result APT_CloseApplication(const u8 *param, size_t paramSize, Handle handle)
Closes the application.
Result APT_ReplySleepNotificationComplete(NS_APPID appID)
Replies that a sleep notification has been completed.
App not initialized.
Definition: apt.h:43
struct tag_aptHookCookie * next
Next cookie.
Definition: apt.h:86
+
System sleeping.
Definition: apt.h:65
Instruction Manual applet.
Definition: apt.h:24
-
Prepare to enter sleep mode.
Definition: apt.h:58
u32 Handle
Resource handle.
Definition: types.h:42
Result APT_PrepareToCloseApplication(u8 a)
Prepares to close the application.
-
Error occurred.
Definition: apt.h:66
u32 aptGetStatusPower(void)
Gets the app's power status.
NS_APPID aptGetMenuAppID(void)
Gets the menu's app ID.
+
Enter sleep mode.
Definition: apt.h:60
Applet closed.
Definition: apt.h:51
Notifications applet.
Definition: apt.h:25
Result APT_JumpToHomeMenu(const u8 *param, size_t paramSize, Handle handle)
Jumps to the home menu.
+
Power button pressed.
Definition: apt.h:63
void(* aptHookFn)(int hook, void *param)
APT hook function.
Definition: apt.h:81
uint8_t u8
8-bit unsigned integer
Definition: types.h:22
Miiverse posting applet (solv3)
Definition: apt.h:27
@@ -587,21 +590,22 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
App suspending.
Definition: apt.h:47
Result APT_CheckNew3DS_System(u8 *out)
Checks whether the system is a New 3DS.
Result APT_SetAppCpuTimeLimit(u32 percent)
Sets the application's CPU time limit.
-
Number of APT hook types.
Definition: apt.h:77
mint
Definition: apt.h:36
App preparing to enter sleep mode.
Definition: apt.h:49
Result APT_StartSystemApplet(NS_APPID appID, u32 bufSize, Handle applHandle, u8 *buf)
Starts a system applet.
+
Error occurred.
Definition: apt.h:66
Miiverse applet (olv)
Definition: apt.h:26
uint32_t u32
32-bit unsigned integer
Definition: types.h:24
Handle aptEvents[3]
APT events.
Result APT_PrepareToStartLibraryApplet(NS_APPID appID)
Prepares to start a library applet.
void aptSetStatusPower(u32 status)
Sets the app's power status.
+
App suspended.
Definition: apt.h:71
Result APT_GetLockHandle(u16 flags, Handle *lockHandle)
Gets an APT lock handle.
Camera applet.
Definition: apt.h:20
void aptCloseSession(void)
Closes an APT session.
+
Prepare to enter sleep mode.
Definition: apt.h:58
Result APT_GetAppletManInfo(u8 inval, u8 *outval8, u32 *outval32, NS_APPID *menu_appid, NS_APPID *active_appid)
Gets applet management info.
Result APT_PrepareToStartSystemApplet(NS_APPID appID)
Prepares to start a system applet.
-
App exiting.
Definition: apt.h:75
void aptExit(void)
Exits APT.
Result APT_PrepareToDoAppJump(u8 flags, u64 programID, u8 mediatype)
Prepares for an applicaton jump.
Home Menu.
Definition: apt.h:19
@@ -610,13 +614,11 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
Result APT_PrepareToJumpToApplication(u32 a)
Prepares to jump to an application.
void aptSetStatus(APP_STATUS status)
Sets the app's status.
void aptWaitStatusEvent(void)
Waits for an APT status event.
-
Home button pressed.
Definition: apt.h:56
Result APT_SendParameter(NS_APPID src_appID, NS_APPID dst_appID, u32 bufferSize, u32 *buffer, Handle paramhandle, u8 signalType)
Sends a parameter.
error
Definition: apt.h:35
Result APT_GetAppCpuTimeLimit(u32 *percent)
Gets the application's CPU time limit.
void * param
Callback parameter.
Definition: apt.h:88
Game Notes applet.
Definition: apt.h:22
-
App restored.
Definition: apt.h:72
App exiting.
Definition: apt.h:46
void aptUnhook(aptHookCookie *cookie)
Removes an APT status hook.
Result APT_JumpToApplication(const u8 *param, size_t paramSize, Handle handle)
Jumps to an application.
@@ -626,18 +628,16 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
Result APT_InquireNotification(u32 appID, u8 *signalType)
Inquires as to whether a signal has been received.
memolib
Definition: apt.h:38
Result APT_HardwareResetAsync(void)
Asynchronously resets the hardware.
-
App waking up.
Definition: apt.h:74
APP_STATUS aptGetStatus(void)
Gets the app's status.
Internet Browser.
Definition: apt.h:23
-
Wake from sleep mode.
Definition: apt.h:61
Result APT_Initialize(NS_APPID appId, Handle *eventHandle1, Handle *eventHandle2)
Initializes an application's registration with APT.
+
Enable.
Definition: apt.h:62
Software Keyboard.
Definition: apt.h:31
Result APT_Finalize(NS_APPID appId)
Terminates an application's registration with APT.
-
App sleeping.
Definition: apt.h:73
appletEd
Definition: apt.h:32
Result APT_LaunchLibraryApplet(NS_APPID appID, Handle inhandle, u32 *parambuf, u32 parambufsize)
Launches a library applet.
-
Enter sleep mode.
Definition: apt.h:60
Applet started.
Definition: apt.h:50
+
App restored.
Definition: apt.h:72
App suspended.
Definition: apt.h:45
PNOTE_AP.
Definition: apt.h:33
Result APT_GetAppletProgramInfo(u32 id, u32 flags, u16 *titleversion)
Gets an applet's program information.
@@ -646,10 +646,10 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
Result APT_NotifyToWait(NS_APPID appID)
Notifies an application to wait.
Result APT_GetProgramID(u64 *pProgramID)
Gets the current application's program ID.
eShop (tiger)
Definition: apt.h:30
-
Utility called.
Definition: apt.h:64
Result APT_StartLibraryApplet(NS_APPID appID, Handle inhandle, u32 *parambuf, u32 parambufsize)
Starts a library applet.
Result APT_GlanceParameter(NS_APPID appID, u32 bufferSize, u32 *buffer, u32 *actualSize, u8 *signalType)
Glances at a receieved parameter without removing it from the queue.
Result APT_PrepareToJumpToHomeMenu(void)
Prepares to jump to the home menu.
+
Wake from sleep mode.
Definition: apt.h:61
Result APT_GetAppletInfo(NS_APPID appID, u64 *pProgramID, u8 *pMediaType, u8 *pRegistered, u8 *pLoadState, u32 *pAttributes)
Gets an applet's information.
void aptReturnToMenu(void)
Triggers a return to the home menu.
diff --git a/audio_2mic_2source_2main_8c-example.html b/audio_2mic_2source_2main_8c-example.html index f86b7f8..98f66a9 100644 --- a/audio_2mic_2source_2main_8c-example.html +++ b/audio_2mic_2source_2main_8c-example.html @@ -148,7 +148,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
printf("Playing the recorded sample\n");
MIC_SetRecording(0);
GSPGPU_FlushDataCache(NULL, audiobuf, audiobuf_pos);
-
csndPlaySound(0x8, SOUND_ONE_SHOT | SOUND_FORMAT_16BIT, 16000, 1.0, 0.0, (u32*)audiobuf, NULL, audiobuf_pos);
+
csndPlaySound(0x8, SOUND_ONE_SHOT | SOUND_FORMAT_16BIT, 16000, 1.0, 0.0, (u32*)audiobuf, NULL, audiobuf_pos);
memset(framebuf, 0xe0, 0x46500);
diff --git a/channel_8h.html b/channel_8h.html index bcfdc9e..bd2ee6b 100644 --- a/channel_8h.html +++ b/channel_8h.html @@ -139,7 +139,7 @@ Functions  
IIR filters
void ndspChnIirMonoSetEnable (int id, bool enable) - Configures whether the IIR mono filter of a channel is enabled. More...
+ Configures whether the IIR monopole filter of a channel is enabled. More...
  void ndspChnIirBiquadSetEnable (int id, bool enable)  Configures whether the IIR biquad filter of a channel is enabled. More...
@@ -190,6 +190,16 @@ Data types } Channel format flags for use with ndspChnSetFormat. More...
  +enum  {
+  NDSP_INTERP_POLYPHASE = 0, +
+  NDSP_INTERP_LINEAR = 1, +
+  NDSP_INTERP_NONE = 2 +
+ } Interpolation types. More...
+  +

Detailed Description

Functions for interacting with DSP audio channels.

@@ -261,6 +271,31 @@ Data types +
+ + +
+
+ + + + +
anonymous enum
+
+ +

Interpolation types.

+ + + + +
Enumerator
NDSP_INTERP_POLYPHASE  +

Polyphase interpolation.

+
NDSP_INTERP_LINEAR  +

Linear interpolation.

+
NDSP_INTERP_NONE  +

No interpolation.

+
+

Function Documentation

@@ -373,11 +408,11 @@ Data types
-

Configures whether the IIR mono filter of a channel is enabled.

+

Configures whether the IIR monopole filter of a channel is enabled.

Parameters
- +
idID of the channel (0..23).
enableWhether to enable the IIR mono filter.
enableWhether to enable the IIR monopole filter.
diff --git a/channel_8h_source.html b/channel_8h_source.html index 218a5b2..74e7994 100644 --- a/channel_8h_source.html +++ b/channel_8h_source.html @@ -127,124 +127,133 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
35  // Flags
36  NDSP_FRONT_BYPASS = BIT(4), ///< Front bypass.
37  NDSP_3D_SURROUND_PREPROCESSED = BIT(6), ///< (?) Unknown, under research
-
38 };
-
39 ///@}
-
40 
-
41 ///@name Basic channel operation
-
42 ///@{
-
43 /**
-
44  * @brief Resets a channel.
-
45  * @param id ID of the channel (0..23).
-
46  */
-
47 void ndspChnReset(int id);
-
48 
-
49 /**
-
50  * @brief Initializes the parameters of a channel.
-
51  * @param id ID of the channel (0..23).
-
52  */
-
53 void ndspChnInitParams(int id);
-
54 
-
55 /**
-
56  * @brief Checks whether a channel is currently playing.
-
57  * @param id ID of the channel (0..23).
-
58  * @return Whether the channel is currently playing.
-
59  */
-
60 bool ndspChnIsPlaying(int id);
-
61 
-
62 /**
-
63  * @brief Gets the current sample position of a channel.
-
64  * @param id ID of the channel (0..23).
-
65  * @return The channel's sample position.
-
66  */
-
67 u32 ndspChnGetSamplePos(int id);
-
68 
-
69 /**
-
70  * @brief Gets the sequence ID of the wave buffer that is currently playing in a channel.
-
71  * @param id ID of the channel (0..23).
-
72  * @return The sequence ID of the wave buffer.
-
73  */
- -
75 ///@}
-
76 
-
77 ///@name Configuration
-
78 ///@{
-
79 /**
-
80  * @brief Sets the format of a channel.
-
81  * @sa NDSP_Encoding
-
82  * @param id ID of the channel (0..23).
-
83  * @param format Format to use.
-
84  */
-
85 void ndspChnSetFormat(int id, u16 format);
-
86 
-
87 /**
-
88  * @brief Sets the interpolation type of a channel.
-
89  * @param id ID of the channel (0..23).
-
90  * @param type Interpolation type to use.
-
91  */
-
92 void ndspChnSetInterp(int id, int type);
-
93 
-
94 /**
-
95  * @brief Sets the sample rate of a channel.
-
96  * @param id ID of the channel (0..23).
-
97  * @param rate Sample rate to use.
-
98  */
-
99 void ndspChnSetRate(int id, float rate);
-
100 
-
101 /**
-
102  * @brief Sets the mix parameters (volumes) of a channel.
-
103  * @param id ID of the channel (0..23).
-
104  * @param mix Mix parameters to use. Working hypothesis:
-
105  * - 0: Front left volume.
-
106  * - 1: Front right volume.
-
107  * - 2: Back left volume:
-
108  * - 3: Back right volume:
-
109  * - 4..7: Same as 0..3, but for auxiliary output 0.
-
110  * - 8..11: Same as 0..3, but for auxiliary output 1.
-
111  */
-
112 void ndspChnSetMix(int id, float mix[12]);
-
113 
-
114 /**
-
115  * @brief Sets the DSPADPCM coefficients of a channel.
-
116  * @param id ID of the channel (0..23).
-
117  * @param coefs DSPADPCM coefficients to use.
-
118  */
-
119 void ndspChnSetAdpcmCoefs(int id, u16 coefs[16]);
-
120 ///@}
-
121 
-
122 ///@name Wave buffers
-
123 ///@{
-
124 /**
-
125  * @brief Clears the wave buffer queue of a channel and stops playback.
-
126  * @param id ID of the channel (0..23).
+
38 };
+
39 
+
40 /// Interpolation types.
+
41 enum
+
42 {
+
43  NDSP_INTERP_POLYPHASE = 0, ///< Polyphase interpolation
+
44  NDSP_INTERP_LINEAR = 1, ///< Linear interpolation
+
45  NDSP_INTERP_NONE = 2, ///< No interpolation
+
46 };
+
47 
+
48 ///@}
+
49 
+
50 ///@name Basic channel operation
+
51 ///@{
+
52 /**
+
53  * @brief Resets a channel.
+
54  * @param id ID of the channel (0..23).
+
55  */
+
56 void ndspChnReset(int id);
+
57 
+
58 /**
+
59  * @brief Initializes the parameters of a channel.
+
60  * @param id ID of the channel (0..23).
+
61  */
+
62 void ndspChnInitParams(int id);
+
63 
+
64 /**
+
65  * @brief Checks whether a channel is currently playing.
+
66  * @param id ID of the channel (0..23).
+
67  * @return Whether the channel is currently playing.
+
68  */
+
69 bool ndspChnIsPlaying(int id);
+
70 
+
71 /**
+
72  * @brief Gets the current sample position of a channel.
+
73  * @param id ID of the channel (0..23).
+
74  * @return The channel's sample position.
+
75  */
+
76 u32 ndspChnGetSamplePos(int id);
+
77 
+
78 /**
+
79  * @brief Gets the sequence ID of the wave buffer that is currently playing in a channel.
+
80  * @param id ID of the channel (0..23).
+
81  * @return The sequence ID of the wave buffer.
+
82  */
+ +
84 ///@}
+
85 
+
86 ///@name Configuration
+
87 ///@{
+
88 /**
+
89  * @brief Sets the format of a channel.
+
90  * @sa NDSP_Encoding
+
91  * @param id ID of the channel (0..23).
+
92  * @param format Format to use.
+
93  */
+
94 void ndspChnSetFormat(int id, u16 format);
+
95 
+
96 /**
+
97  * @brief Sets the interpolation type of a channel.
+
98  * @param id ID of the channel (0..23).
+
99  * @param type Interpolation type to use.
+
100  */
+
101 void ndspChnSetInterp(int id, int type);
+
102 
+
103 /**
+
104  * @brief Sets the sample rate of a channel.
+
105  * @param id ID of the channel (0..23).
+
106  * @param rate Sample rate to use.
+
107  */
+
108 void ndspChnSetRate(int id, float rate);
+
109 
+
110 /**
+
111  * @brief Sets the mix parameters (volumes) of a channel.
+
112  * @param id ID of the channel (0..23).
+
113  * @param mix Mix parameters to use. Working hypothesis:
+
114  * - 0: Front left volume.
+
115  * - 1: Front right volume.
+
116  * - 2: Back left volume:
+
117  * - 3: Back right volume:
+
118  * - 4..7: Same as 0..3, but for auxiliary output 0.
+
119  * - 8..11: Same as 0..3, but for auxiliary output 1.
+
120  */
+
121 void ndspChnSetMix(int id, float mix[12]);
+
122 
+
123 /**
+
124  * @brief Sets the DSPADPCM coefficients of a channel.
+
125  * @param id ID of the channel (0..23).
+
126  * @param coefs DSPADPCM coefficients to use.
127  */
-
128 void ndspChnWaveBufClear(int id);
-
129 
-
130 /**
-
131  * @brief Adds a wave buffer to the wave buffer queue of a channel.
-
132  * @remark If the channel's wave buffer queue was empty before the use of this function, playback is started.
-
133  * @param id ID of the channel (0..23).
-
134  * @param buf Wave buffer to add.
-
135  */
-
136 void ndspChnWaveBufAdd(int id, ndspWaveBuf* buf);
-
137 ///@}
-
138 
-
139 ///@name IIR filters
-
140 ///@{
-
141 /**
-
142  * @brief Configures whether the IIR mono filter of a channel is enabled.
-
143  * @param id ID of the channel (0..23).
-
144  * @param enable Whether to enable the IIR mono filter.
-
145  */
-
146 void ndspChnIirMonoSetEnable(int id, bool enable);
-
147 // ndspChnIirMonoSetParams
-
148 /**
-
149  * @brief Configures whether the IIR biquad filter of a channel is enabled.
-
150  * @param id ID of the channel (0..23).
-
151  * @param enable Whether to enable the IIR biquad filter.
-
152  */
-
153 void ndspChnIirBiquadSetEnable(int id, bool enable);
-
154 // ndspChnIirBiquadSetParams
-
155 ///@}
+
128 void ndspChnSetAdpcmCoefs(int id, u16 coefs[16]);
+
129 ///@}
+
130 
+
131 ///@name Wave buffers
+
132 ///@{
+
133 /**
+
134  * @brief Clears the wave buffer queue of a channel and stops playback.
+
135  * @param id ID of the channel (0..23).
+
136  */
+
137 void ndspChnWaveBufClear(int id);
+
138 
+
139 /**
+
140  * @brief Adds a wave buffer to the wave buffer queue of a channel.
+
141  * @remark If the channel's wave buffer queue was empty before the use of this function, playback is started.
+
142  * @param id ID of the channel (0..23).
+
143  * @param buf Wave buffer to add.
+
144  */
+
145 void ndspChnWaveBufAdd(int id, ndspWaveBuf* buf);
+
146 ///@}
+
147 
+
148 ///@name IIR filters
+
149 ///@{
+
150 /**
+
151  * @brief Configures whether the IIR monopole filter of a channel is enabled.
+
152  * @param id ID of the channel (0..23).
+
153  * @param enable Whether to enable the IIR monopole filter.
+
154  */
+
155 void ndspChnIirMonoSetEnable(int id, bool enable);
+
156 // ndspChnIirMonoSetParams
+
157 /**
+
158  * @brief Configures whether the IIR biquad filter of a channel is enabled.
+
159  * @param id ID of the channel (0..23).
+
160  * @param enable Whether to enable the IIR biquad filter.
+
161  */
+
162 void ndspChnIirBiquadSetEnable(int id, bool enable);
+
163 // ndspChnIirBiquadSetParams
+
164 ///@}
Front bypass.
Definition: channel.h:36
void ndspChnSetRate(int id, float rate)
Sets the sample rate of a channel.
u32 ndspChnGetSamplePos(int id)
Gets the current sample position of a channel.
@@ -254,14 +263,16 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
void ndspChnWaveBufAdd(int id, ndspWaveBuf *buf)
Adds a wave buffer to the wave buffer queue of a channel.
PCM8.
Definition: channel.h:12
PCM16.
Definition: channel.h:13
-
void ndspChnIirMonoSetEnable(int id, bool enable)
Configures whether the IIR mono filter of a channel is enabled.
+
void ndspChnIirMonoSetEnable(int id, bool enable)
Configures whether the IIR monopole filter of a channel is enabled.
DSPADPCM (GameCube format)
Definition: channel.h:14
void ndspChnReset(int id)
Resets a channel.
Buffer contains Stereo PCM16.
Definition: channel.h:29
uint32_t u32
32-bit unsigned integer
Definition: types.h:24
(Alias) Buffer contains Mono PCM8.
Definition: channel.h:31
+
No interpolation.
Definition: channel.h:45
u16 ndspChnGetWaveBufSeq(int id)
Gets the sequence ID of the wave buffer that is currently playing in a channel.
#define NDSP_CHANNELS(n)
Specifies the number of channels used in a sample.
Definition: channel.h:18
+
Polyphase interpolation.
Definition: channel.h:43
bool ndspChnIsPlaying(int id)
Checks whether a channel is currently playing.
(Alias) Buffer contains Mono PCM16.
Definition: channel.h:32
Buffer contains Mono PCM16.
Definition: channel.h:26
@@ -275,6 +286,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
void ndspChnSetInterp(int id, int type)
Sets the interpolation type of a channel.
Buffer contains Mono ADPCM.
Definition: channel.h:27
void ndspChnSetMix(int id, float mix[12])
Sets the mix parameters (volumes) of a channel.
+
Linear interpolation.
Definition: channel.h:44
(?) Unknown, under research
Definition: channel.h:37
void ndspChnSetFormat(int id, u16 format)
Sets the format of a channel.
diff --git a/csnd_8h.html b/csnd_8h.html index 4f90eeb..be0b70c 100644 --- a/csnd_8h.html +++ b/csnd_8h.html @@ -137,83 +137,83 @@ Macros - - + } + - - + } + - - + } + - - + } + - - + } +

Enumerations

enum  {
-  CSND_ENCODING_PCM8 = 0, +
enum  {
+  CSND_ENCODING_PCM8 = 0,
-  CSND_ENCODING_PCM16, +  CSND_ENCODING_PCM16,
-  CSND_ENCODING_ADPCM, +  CSND_ENCODING_ADPCM,
-  CSND_ENCODING_PSG +  CSND_ENCODING_PSG
- }
 CSND encodings. More...
 
 CSND encodings. More...
 
enum  {
-  CSND_LOOPMODE_MANUAL = 0, +
enum  {
+  CSND_LOOPMODE_MANUAL = 0,
-  CSND_LOOPMODE_NORMAL, +  CSND_LOOPMODE_NORMAL,
-  CSND_LOOPMODE_ONESHOT, +  CSND_LOOPMODE_ONESHOT,
-  CSND_LOOPMODE_NORELOAD +  CSND_LOOPMODE_NORELOAD
- }
 CSND loop modes. More...
 
 CSND loop modes. More...
 
enum  {
-  SOUND_LINEAR_INTERP = BIT(6), +
enum  {
+  SOUND_LINEAR_INTERP = BIT(6),
-  SOUND_REPEAT = SOUND_LOOPMODE(CSND_LOOPMODE_NORMAL), +  SOUND_REPEAT = SOUND_LOOPMODE(CSND_LOOPMODE_NORMAL),
-  SOUND_ONE_SHOT = SOUND_LOOPMODE(CSND_LOOPMODE_ONESHOT), +  SOUND_ONE_SHOT = SOUND_LOOPMODE(CSND_LOOPMODE_ONESHOT),
-  SOUND_FORMAT_8BIT = SOUND_FORMAT(CSND_ENCODING_PCM8), +  SOUND_FORMAT_8BIT = SOUND_FORMAT(CSND_ENCODING_PCM8),
-  SOUND_FORMAT_16BIT = SOUND_FORMAT(CSND_ENCODING_PCM16), +  SOUND_FORMAT_16BIT = SOUND_FORMAT(CSND_ENCODING_PCM16),
-  SOUND_FORMAT_ADPCM = SOUND_FORMAT(CSND_ENCODING_ADPCM), +  SOUND_FORMAT_ADPCM = SOUND_FORMAT(CSND_ENCODING_ADPCM),
-  SOUND_FORMAT_PSG = SOUND_FORMAT(CSND_ENCODING_PSG), +  SOUND_FORMAT_PSG = SOUND_FORMAT(CSND_ENCODING_PSG),
-  SOUND_ENABLE = BIT(14) +  SOUND_ENABLE = BIT(14)
- }
 Sound flags. More...
 
 Sound flags. More...
 
enum  {
-  CAPTURE_REPEAT = 0, +
enum  {
+  CAPTURE_REPEAT = 0,
-  CAPTURE_ONE_SHOT = BIT(0), +  CAPTURE_ONE_SHOT = BIT(0),
-  CAPTURE_FORMAT_16BIT = 0, +  CAPTURE_FORMAT_16BIT = 0,
-  CAPTURE_FORMAT_8BIT = BIT(1), +  CAPTURE_FORMAT_8BIT = BIT(1),
-  CAPTURE_ENABLE = BIT(15) +  CAPTURE_ENABLE = BIT(15)
- }
 Capture modes. More...
 
 Capture modes. More...
 
enum  {
-  DutyCycle_0 = 7, +
enum  {
+  DutyCycle_0 = 7,
-  DutyCycle_12 = 0, +  DutyCycle_12 = 0,
-  DutyCycle_25 = 1, +  DutyCycle_25 = 1,
-  DutyCycle_37 = 2, +  DutyCycle_37 = 2,
-  DutyCycle_50 = 3, +  DutyCycle_50 = 3,
-  DutyCycle_62 = 4, +  DutyCycle_62 = 4,
-  DutyCycle_75 = 5, +  DutyCycle_75 = 5,
-  DutyCycle_87 = 6 +  DutyCycle_87 = 6
- }
 Duty cycles for a PSG channel. More...
 
 Duty cycles for a PSG channel. More...
 

Detailed Description

CSND service.

Enumeration Type Documentation

- -
-
-

@@ -356,47 +356,7 @@ Variables

- - - -
anonymous enum
-
- -

Duty cycles for a PSG channel.

- - - - - - - - - -
Enumerator
DutyCycle_0  -

0.0% duty cycle

-
DutyCycle_12  -

12.5% duty cycle

-
DutyCycle_25  -

25.0% duty cycle

-
DutyCycle_37  -

37.5% duty cycle

-
DutyCycle_50  -

50.0% duty cycle

-
DutyCycle_62  -

62.5% duty cycle

-
DutyCycle_75  -

75.0% duty cycle

-
DutyCycle_87  -

87.5% duty cycle

-
- -
- - +
@@ -408,23 +368,23 @@ Variables

CSND encodings.

- - - -
Enumerator
CSND_ENCODING_PCM8  +
Enumerator
CSND_ENCODING_PCM8 

PCM8.

CSND_ENCODING_PCM16  +
CSND_ENCODING_PCM16 

PCM16.

CSND_ENCODING_ADPCM  +
CSND_ENCODING_ADPCM 

IMA-ADPCM.

CSND_ENCODING_PSG  +
CSND_ENCODING_PSG 

PSG (Similar to DS?)

- +
@@ -436,23 +396,23 @@ Variables

CSND loop modes.

- - - -
Enumerator
CSND_LOOPMODE_MANUAL  +
Enumerator
CSND_LOOPMODE_MANUAL 

Manual loop.

CSND_LOOPMODE_NORMAL  +
CSND_LOOPMODE_NORMAL 

Normal loop.

CSND_LOOPMODE_ONESHOT  +
CSND_LOOPMODE_ONESHOT 

Do not loop.

CSND_LOOPMODE_NORELOAD  +
CSND_LOOPMODE_NORELOAD 

Don't reload.

- +
@@ -464,35 +424,35 @@ Variables

Sound flags.

- - - - - - - -
Enumerator
SOUND_LINEAR_INTERP  +
Enumerator
SOUND_LINEAR_INTERP 

Linear interpolation.

SOUND_REPEAT  +
SOUND_REPEAT 

Repeat the sound.

SOUND_ONE_SHOT  +
SOUND_ONE_SHOT 

Play the sound once.

SOUND_FORMAT_8BIT  +
SOUND_FORMAT_8BIT 

PCM8.

SOUND_FORMAT_16BIT  +
SOUND_FORMAT_16BIT 

PCM16.

SOUND_FORMAT_ADPCM  +
SOUND_FORMAT_ADPCM 

ADPCM.

SOUND_FORMAT_PSG  +
SOUND_FORMAT_PSG 

PSG.

SOUND_ENABLE  +
SOUND_ENABLE 

Enable sound.

- +
@@ -504,23 +464,63 @@ Variables

Capture modes.

- - - - -
Enumerator
CAPTURE_REPEAT  +
Enumerator
CAPTURE_REPEAT 

Repeat capture.

CAPTURE_ONE_SHOT  +
CAPTURE_ONE_SHOT 

Capture once.

CAPTURE_FORMAT_16BIT  +
CAPTURE_FORMAT_16BIT 

PCM16.

CAPTURE_FORMAT_8BIT  +
CAPTURE_FORMAT_8BIT 

PCM8.

CAPTURE_ENABLE  +
CAPTURE_ENABLE 

Enable capture.

+
+
+ +
+
+ + + + +
anonymous enum
+
+ +

Duty cycles for a PSG channel.

+ + + + + + + + + +
Enumerator
DutyCycle_0  +

0.0% duty cycle

+
DutyCycle_12  +

12.5% duty cycle

+
DutyCycle_25  +

25.0% duty cycle

+
DutyCycle_37  +

37.5% duty cycle

+
DutyCycle_50  +

50.0% duty cycle

+
DutyCycle_62  +

62.5% duty cycle

+
DutyCycle_75  +

75.0% duty cycle

+
DutyCycle_87  +

87.5% duty cycle

+
+

Function Documentation

diff --git a/csnd_8h_source.html b/csnd_8h_source.html index d9f1195..9db8bf2 100644 --- a/csnd_8h_source.html +++ b/csnd_8h_source.html @@ -127,19 +127,19 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
35 /// CSND encodings.
36 enum
37 {
-
38  CSND_ENCODING_PCM8 = 0, ///< PCM8
-
39  CSND_ENCODING_PCM16, ///< PCM16
-
40  CSND_ENCODING_ADPCM, ///< IMA-ADPCM
-
41  CSND_ENCODING_PSG, ///< PSG (Similar to DS?)
+
38  CSND_ENCODING_PCM8 = 0, ///< PCM8
+
39  CSND_ENCODING_PCM16, ///< PCM16
+
40  CSND_ENCODING_ADPCM, ///< IMA-ADPCM
+
41  CSND_ENCODING_PSG, ///< PSG (Similar to DS?)
42 };
43 
44 /// CSND loop modes.
45 enum
46 {
-
47  CSND_LOOPMODE_MANUAL = 0, ///< Manual loop.
-
48  CSND_LOOPMODE_NORMAL, ///< Normal loop.
-
49  CSND_LOOPMODE_ONESHOT, ///< Do not loop.
-
50  CSND_LOOPMODE_NORELOAD, ///< Don't reload.
+
47  CSND_LOOPMODE_MANUAL = 0, ///< Manual loop.
+
48  CSND_LOOPMODE_NORMAL, ///< Normal loop.
+
49  CSND_LOOPMODE_ONESHOT, ///< Do not loop.
+
50  CSND_LOOPMODE_NORELOAD, ///< Don't reload.
51 };
52 
53 /// Creates a sound channel value from a channel number.
@@ -154,37 +154,37 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
62 /// Sound flags.
63 enum
64 {
-
65  SOUND_LINEAR_INTERP = BIT(6), ///< Linear interpolation.
-
66  SOUND_REPEAT = SOUND_LOOPMODE(CSND_LOOPMODE_NORMAL), ///< Repeat the sound.
-
67  SOUND_ONE_SHOT = SOUND_LOOPMODE(CSND_LOOPMODE_ONESHOT), ///< Play the sound once.
-
68  SOUND_FORMAT_8BIT = SOUND_FORMAT(CSND_ENCODING_PCM8), ///< PCM8
-
69  SOUND_FORMAT_16BIT = SOUND_FORMAT(CSND_ENCODING_PCM16), ///< PCM16
-
70  SOUND_FORMAT_ADPCM = SOUND_FORMAT(CSND_ENCODING_ADPCM), ///< ADPCM
-
71  SOUND_FORMAT_PSG = SOUND_FORMAT(CSND_ENCODING_PSG), ///< PSG
-
72  SOUND_ENABLE = BIT(14), ///< Enable sound.
+
65  SOUND_LINEAR_INTERP = BIT(6), ///< Linear interpolation.
+
66  SOUND_REPEAT = SOUND_LOOPMODE(CSND_LOOPMODE_NORMAL), ///< Repeat the sound.
+
67  SOUND_ONE_SHOT = SOUND_LOOPMODE(CSND_LOOPMODE_ONESHOT), ///< Play the sound once.
+
68  SOUND_FORMAT_8BIT = SOUND_FORMAT(CSND_ENCODING_PCM8), ///< PCM8
+
69  SOUND_FORMAT_16BIT = SOUND_FORMAT(CSND_ENCODING_PCM16), ///< PCM16
+
70  SOUND_FORMAT_ADPCM = SOUND_FORMAT(CSND_ENCODING_ADPCM), ///< ADPCM
+
71  SOUND_FORMAT_PSG = SOUND_FORMAT(CSND_ENCODING_PSG), ///< PSG
+
72  SOUND_ENABLE = BIT(14), ///< Enable sound.
73 };
74 
75 /// Capture modes.
76 enum
77 {
-
78  CAPTURE_REPEAT = 0, ///< Repeat capture.
-
79  CAPTURE_ONE_SHOT = BIT(0), ///< Capture once.
-
80  CAPTURE_FORMAT_16BIT = 0, ///< PCM16
-
81  CAPTURE_FORMAT_8BIT = BIT(1), ///< PCM8
-
82  CAPTURE_ENABLE = BIT(15), ///< Enable capture.
+
78  CAPTURE_REPEAT = 0, ///< Repeat capture.
+
79  CAPTURE_ONE_SHOT = BIT(0), ///< Capture once.
+
80  CAPTURE_FORMAT_16BIT = 0, ///< PCM16
+
81  CAPTURE_FORMAT_8BIT = BIT(1), ///< PCM8
+
82  CAPTURE_ENABLE = BIT(15), ///< Enable capture.
83 };
84 
85 /// Duty cycles for a PSG channel.
86 enum
87 {
-
88  DutyCycle_0 = 7, ///< 0.0% duty cycle
-
89  DutyCycle_12 = 0, ///< 12.5% duty cycle
-
90  DutyCycle_25 = 1, ///< 25.0% duty cycle
-
91  DutyCycle_37 = 2, ///< 37.5% duty cycle
-
92  DutyCycle_50 = 3, ///< 50.0% duty cycle
-
93  DutyCycle_62 = 4, ///< 62.5% duty cycle
-
94  DutyCycle_75 = 5, ///< 75.0% duty cycle
-
95  DutyCycle_87 = 6 ///< 87.5% duty cycle
+
88  DutyCycle_0 = 7, ///< 0.0% duty cycle
+
89  DutyCycle_12 = 0, ///< 12.5% duty cycle
+
90  DutyCycle_25 = 1, ///< 25.0% duty cycle
+
91  DutyCycle_37 = 2, ///< 37.5% duty cycle
+
92  DutyCycle_50 = 3, ///< 50.0% duty cycle
+
93  DutyCycle_62 = 4, ///< 62.5% duty cycle
+
94  DutyCycle_75 = 5, ///< 75.0% duty cycle
+
95  DutyCycle_87 = 6 ///< 87.5% duty cycle
96 };
97 
98 /// Channel info.
@@ -499,100 +499,100 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
407  * @param status Pointer to output the channel status to.
408  */
409 Result csndIsPlaying(u32 channel, u8* status);
+
PSG (Similar to DS?)
Definition: csnd.h:41
void CSND_SetInterp(u32 channel, bool interp)
Sets whether a channel should use interpolation.
volatile u32 vu32
32-bit volatile unsigned integer.
Definition: types.h:34
+
62.5% duty cycle
Definition: csnd.h:93
Various system types.
s32 Result
Function result.
Definition: types.h:43
-
62.5% duty cycle
Definition: csnd.h:93
u32 unknownZero
Unknown.
Definition: csnd.h:123
-
ADPCM.
Definition: csnd.h:70
-
IMA-ADPCM.
Definition: csnd.h:40
+
Enable capture.
Definition: csnd.h:82
Result CSND_Reset(void)
Resets CSND.
uint16_t u16
16-bit unsigned integer
Definition: types.h:23
u16 _pad2
Padding.
Definition: csnd.h:122
-
12.5% duty cycle
Definition: csnd.h:89
+
Linear interpolation.
Definition: csnd.h:65
void CSND_SetLooping(u32 channel, u32 value)
Sets whether to loop a channel.
+
Normal loop.
Definition: csnd.h:48
void csndWriteCmd(int cmdid, u8 *cmdparams)
Adds a command to the list, copying its arguments from a buffer.
-
87.5% duty cycle
Definition: csnd.h:95
void CSND_SetChnRegsNoise(u32 flags, u32 chnVolumes, u32 capVolumes)
Sets CSND's noise channel registers.
+
PCM16.
Definition: csnd.h:80
u8 _pad1
Padding.
Definition: csnd.h:105
void CSND_SetEncoding(u32 channel, u32 value)
Sets a channel's encoding.
uint8_t u8
8-bit unsigned integer
Definition: types.h:22
-
Repeat capture.
Definition: csnd.h:78
#define SOUND_FORMAT(n)
Creates a sound format value from an encoding.
Definition: csnd.h:57
#define SOUND_LOOPMODE(n)
Creates a sound loop mode value from a loop mode.
Definition: csnd.h:60
void csndGetDspFlags(u32 *outSemFlags, u32 *outIrqFlags)
Gets CSND's DSP flags.
+
37.5% duty cycle
Definition: csnd.h:91
+
Enable sound.
Definition: csnd.h:72
u8 adpcmIndex
Current ADPCM index.
Definition: csnd.h:108
CSND_CapInfo * csndGetCapInfo(u32 capUnit)
Gets a capture unit's information.
uint32_t u32
32-bit unsigned integer
Definition: types.h:24
-
PCM16.
Definition: csnd.h:80
+
Play the sound once.
Definition: csnd.h:67
+
75.0% duty cycle
Definition: csnd.h:94
void CSND_CapEnable(u32 capUnit, bool enable)
Sets whether a capture unit is enabled.
u32 * csndAddCmd(int cmdid)
Adds a command to the list, returning a buffer to write arguments to.
void CSND_CapSetFormat(u32 capUnit, bool eightbit)
Sets a capture unit's format.
+
50.0% duty cycle
Definition: csnd.h:92
void CSND_SetCapRegs(u32 capUnit, u32 flags, u32 addr, u32 size)
Sets a capture unit's capture registers.
-
25.0% duty cycle
Definition: csnd.h:90
Result csndInit(void)
Initializes CSND.
Result CSND_ReleaseCapUnit(u32 capUnit)
Releases a capture unit.
void CSND_SetPlayState(u32 channel, u32 value)
Sets a channel's play state.
-
Enable sound.
Definition: csnd.h:72
-
PSG.
Definition: csnd.h:71
-
0.0% duty cycle
Definition: csnd.h:88
+
PCM8.
Definition: csnd.h:38
+
ADPCM.
Definition: csnd.h:70
void CSND_SetChnRegsPSG(u32 flags, u32 chnVolumes, u32 capVolumes, u32 duty)
Sets CSND's PSG channel registers.
void CSND_SetChnRegs(u32 flags, u32 physaddr0, u32 physaddr1, u32 totalbytesize, u32 chnVolumes, u32 capVolumes)
Sets CSND's channel registers.
-
Don't reload.
Definition: csnd.h:50
+
Repeat capture.
Definition: csnd.h:78
void CSND_SetAdpcmState(u32 channel, int block, int sample, int index)
Sets a channel's ADPCM state.
+
PCM8.
Definition: csnd.h:81
vu32 * csndSharedMem
CSND shared memory.
-
Normal loop.
Definition: csnd.h:48
s16 adpcmSample
Current ADPCM sample.
Definition: csnd.h:107
+
Capture once.
Definition: csnd.h:79
void CSND_SetDuty(u32 channel, u32 duty)
Sets a channel's duty.
+
PCM16.
Definition: csnd.h:69
+
25.0% duty cycle
Definition: csnd.h:90
void CSND_CapSetBuffer(u32 capUnit, u32 addr, u32 size)
Sets a capture unit's buffer.
-
PCM16.
Definition: csnd.h:69
void CSND_SetPlayStateR(u32 channel, u32 value)
Sets a channel's play state, resetting registers on stop.
Result CSND_AcquireCapUnit(u32 *capUnit)
Acquires a capture unit.
void CSND_SetBlock(u32 channel, int block, u32 physaddr, u32 size)
Sets the data of a channel's block.
+
0.0% duty cycle
Definition: csnd.h:88
Result csndExecCmds(bool waitDone)
Executes pending CSND commands.
-
Linear interpolation.
Definition: csnd.h:65
-
Capture once.
Definition: csnd.h:79
void CSND_SetTimer(u32 channel, u32 timer)
Sets a channel's timer.
+
12.5% duty cycle
Definition: csnd.h:89
CSND_ChnInfo * csndGetChnInfo(u32 channel)
Gets a channel's information.
#define BIT(n)
Creates a bitmask from a bit number.
Definition: types.h:47
u32 csndSharedMemSize
CSND shared memory size.
-
PCM8.
Definition: csnd.h:81
Result CSND_UpdateInfo(bool waitDone)
Updates CSND information.
Result CSND_SetDspFlags(bool waitDone)
Sets up DSP flags.
+
Don't reload.
Definition: csnd.h:50
+
PSG.
Definition: csnd.h:71
u16 _pad2
Padding.
Definition: csnd.h:106
Channel info.
Definition: csnd.h:99
u8 active
Capture active.
Definition: csnd.h:120
Result csndGetState(u32 channel, CSND_ChnInfo *out)
Gets a channel's state.
void CSND_SetAdpcmReload(u32 channel, bool reload)
Sets a whether channel's ADPCM data should be reloaded when the second block is played.
Result csndIsPlaying(u32 channel, u8 *status)
Gets whether a channel is playing.
-
PCM16.
Definition: csnd.h:39
-
PCM8.
Definition: csnd.h:68
+
PCM8.
Definition: csnd.h:68
+
IMA-ADPCM.
Definition: csnd.h:40
Result csndExit(void)
Exits CSND.
void CSND_CapSetBit2(u32 capUnit, bool set)
Sets a capture unit's second bit.
-
Manual loop.
Definition: csnd.h:47
Capture info.
Definition: csnd.h:115
-
PCM8.
Definition: csnd.h:38
u32 unknownZero
Unknown.
Definition: csnd.h:110
-
Enable capture.
Definition: csnd.h:82
void CSND_SetBit7(u32 channel, bool set)
Sets bit 7 of a channel.
static u32 CSND_VOL(float vol, float pan)
Converts a vol-pan pair into a left/right volume pair used by the hardware.
Definition: csnd.h:21
void CSND_CapSetTimer(u32 capUnit, u32 timer)
Sets a capture unit's timer.
Result csndPlaySound(int chn, u32 flags, u32 sampleRate, float vol, float pan, void *data0, void *data1, u32 size)
Plays a sound.
-
Play the sound once.
Definition: csnd.h:67
-
37.5% duty cycle
Definition: csnd.h:91
+
PCM16.
Definition: csnd.h:39
+
Manual loop.
Definition: csnd.h:47
u32 csndChannels
Bitmask of channels that are allowed for usage.
u8 active
Channel active.
Definition: csnd.h:104
-
PSG (Similar to DS?)
Definition: csnd.h:41
void CSND_CapSetRepeat(u32 capUnit, bool repeat)
Sets whether a capture unit should repeat.
-
50.0% duty cycle
Definition: csnd.h:92
-
75.0% duty cycle
Definition: csnd.h:94
-
Do not loop.
Definition: csnd.h:49
-
Repeat the sound.
Definition: csnd.h:66
u8 _pad3
Padding.
Definition: csnd.h:109
u8 _pad1
Padding.
Definition: csnd.h:121
int16_t s16
16-bit signed integer
Definition: types.h:28
+
87.5% duty cycle
Definition: csnd.h:95
void CSND_SetVol(u32 channel, u32 chnVolumes, u32 capVolumes)
Sets a channel's volume.
+
Repeat the sound.
Definition: csnd.h:66
+
Do not loop.
Definition: csnd.h:49