CSND Shared Memory: Difference between revisions

No edit summary
 
Line 251: Line 251:
| 0xC
| 0xC
| 2
| 2
| Left volume
| Left channel volume
|-
|-
| 0xE
| 0xE
| 2
| 2
| Right volume
| Right channel volume
|-
|-
| 0x10
| 0x10
| 0x10
| 2
| Usually zero?
| Left capture volume
|-
| 0x12
| 2
| Right capture volume
|}
|}


This sets the playback volumes for the specified channel. This command must be used after command 0x8(user processes use cmd8 a second time before using this command). The parameter values seem to have no affect when not using IMA-ADPCM encoding?
This sets the playback and capture volumes for the specified channel. This command is usually used after command 0x8(user processes use cmd8 a second time before using this command).


==Command 0xA==
==Command 0xA==
Line 373: Line 377:
| 0x8
| 0x8
| 4
| 4
| See below.
| See below. (Flags + Timer)
|-
|-
| 0xC
| 0xC
| 4
| 4
| See below.
| See below. (Channel volume)
|-
|-
| 0x10
| 0x10
| 4
| 4
| See below. Usually zero?
| See below. (Capture volume)
|-
|-
| 0x14
| 0x14
Line 411: Line 415:
|-
|-
| 9-7
| 9-7
| ?
| Ignored
|-
|-
| 11-10
| 11-10
Line 423: Line 427:
|-
|-
| 15
| 15
| ?
| Ignored
|-
|-
| 31-16
| 31-16
Line 440: Line 444:
|-
|-
| 15-0
| 15-0
| Left volume, this value is clamped to the following range(by the user process): 0x0-0x8000.
| Left channel volume, this value is clamped to the following range(by the user process): 0x0-0x8000.
|-
|-
| 31-16
| 31-16
| Right volume, this value is clamped to the following range(by the user process): 0x0-0x8000.
| Right channel volume, this value is clamped to the following range(by the user process): 0x0-0x8000.
|}
|}


Line 453: Line 457:
|-
|-
| 15-0
| 15-0
| Unknown, this value is clamped to the following range(by the user process): 0x0-0x8000.
| Left capture volume, this value is clamped to the following range(by the user process): 0x0-0x8000.
|-
|-
| 31-16
| 31-16
| Unknown, this value is clamped to the following range(by the user process): 0x0-0x8000.
| Right capture volume, this value is clamped to the following range(by the user process): 0x0-0x8000.
|}
|}


==Command 0xF==
==Command 0xF==
Unknown.
{| class="wikitable" border="1"
|-
!  Index Byte
!  Size
!  Description
|-
| 0x2
| 2
| CmdID 0xF
|-
| 0x8
| 4
| Flags, as in command 0xE. Only the timer and the start/stop (bit14) bits are used.
|-
| 0xC
| 4
| Channel volume, same as in command 0xE.
|-
| 0x10
| 4
| Capture volume, same as in command 0xE.
|-
| 0x14
| 4
| Duty (see command 0x7).
|}
 
This channel is similar to command 0xE, but it is tailored for configuring PSG Tone channels (8, 9, 10, 11, 12, 13) as it contains a duty parameter. Channel format is set to PSG.
 
==Command 0x10==
{| class="wikitable" border="1"
|-
!  Index Byte
!  Size
!  Description
|-
| 0x2
| 2
| CmdID 0xF
|-
| 0x8
| 4
| Flags, as in command 0xE. Only the timer and the start/stop (bit14) bits are used. Channel format is set to PSG.
|-
| 0xC
| 4
| Channel volume, same as in command 0xE.
|-
| 0x10
| 4
| Capture volume, same as in command 0xE.
|}
 
This channel is identical to command 0xF except for not having a duty parameter. Presumably used to configure PSG Noise channels (14, 15).


==Command 0x100==
==Command 0x100==