RISC OS Open
A fast and easily customised operating system for ARM devices
ROOL
Home | News | Downloads | Bugs | Bounties | Forum | Documents | Photos | Contact us
Account

Sound_Configure

SoundDMA
» SWI Calls
» Sound_Configure

Sound_Configure

(SWI &40140)
Entry
R0 Channels for 8 bit sound, rounded up to 1,2,4 or 8
or 0 to preserve previous value
R1 Samples per channel (in bytes)
or 0 to preserve previous value
R2 Sample period (in microseconds per channel)
or 0 to preserve previous value
R3 Pointer to Channel Handler
or 0 to preserve previous value
R4 Pointer to Scheduler
or 0 to preserve previous value
Exit
R0-R4 Previous values

Use

Used to configure the number of sound channels, the sample period and the sample length. It can also be used by specialised applications to replace the default Channel Handler and Scheduler.
All current settings may be read by using zero for all input parameters.

Notes

R0 only controls the number of 8 bit sound channels; the 16 bit sound system always has two channels (left and right).

Although R2 can be used to specify the sample period, the preferred method to set or read the sample rate for RISC OS 3.5 and above is to use Sound_SampleRate.

If no Channel Handler and/or Scheduler are installed, the previous pointers returned in R3 / R4 will be invalid. Validity may be confirmed by checking the lowest two bits of the relevant register are zero, ie TST R3, #3

Service_Sound 8 will be issued if the sound configuration changes as a result of this call.

Revised on February 21, 2018 18:55:00 by Jon Abbott (1421)? (86.184.247.184)
Edit | Back in time (7 revisions) | See changes | History | Views: Print | Source | Linked from: *ChannelVoice, Sound system volume controls, Sound SWI Calls, Sound Voice Generator, Sound Channel Handler, Sound_Volume, Sound Voice Generator Update, Sound Voice Generator GateOff, Sound Voice Generator Fill, Sound Channel Control Block, Sound Voice Generator Instantiate, Sound Voice Generator Free, Sound Scheduler, Sound Voice Generator GateOn, SoundDMA SWI Calls, Sound_SampleRate 3

Search the Wiki

Social

Follow us on and

ROOL Store

Buy RISC OS Open merchandise here, including SD cards for Raspberry Pi and more.

Donate! Why?

Help ROOL make things happen – please consider donating!

RISC OS IPR

RISC OS is an Open Source operating system owned by RISC OS Developments Ltd and licensed primarily under the Apache 2.0 license.

Navigation

  • Home Page
  • All Pages
  • Recently Revised
  • Authors
  • Feeds
Site design © RISC OS Open Limited 2018 except where indicated
The RISC OS Open Instiki theme is based on Insitki's default layout

Valid XHTML 1.0  |  Valid CSS

Instiki 0.19.1(MML+)
This site runs on Rails

Hosted by Arachsys