port! type available, and the possibility to implement a sound:// port. So now the question is what audio features to support?sound:// port for playing samples in raw format (binary!) and user-generated sounds.music:// port for playing encoded audio tracks in WAV or MP3 formats (at least).mixer be a port though? I see it as a dialect for controlling ports and sounds, their position, level, state (play/pause/resume/stop), transition, etc., like VID is for GUIs.bass/do could be replaced with whatever else while the syntax of the DSL would keep same.sound:// port.The Core Audio APIs are:
Multimedia Device (MMDevice) API. Clients use this API to enumerate the audio endpoint devices in the system.
Windows Audio Session API (WASAPI). Clients use this API to create and manage audio streams to and from audio endpoint devices.
DeviceTopology API. Clients use this API to directly access the topological features (for example, volume controls and multiplexers) that lie along the data paths inside hardware devices in audio adapters.
EndpointVolume API. Clients use this API to directly access the volume controls on audio endpoint devices. This API is primarily used by applications that manage exclusive-mode audio streams.audio as a port or set of native commands (accessible directly or using some DSL) :/port! and I believe sample-precise audio can be done that way.sound:// port than audio:// port. I'm more interested in the second one as feeding all the buffers manually would be a waste of resources from the higher level code.video://.a: open [scheme: 'audio channels: 32] write a [ sound: load %jaguar.wav ;sound can be loaded from file drum: load %drumloop.wav [loop fx volume: 0] ;optional default settings can be specified music: load %feroness_-_sun.mod ;loads MOD file channel: play music [volume: 0] ;channel can be stored for later use, optional block with settings can be used fade channel [volume: 0.3] 0:0:20 ;it is possible to fade some values in time play sound [volume: 0.4 pan: -1] ;or not if not needed loop: play drum [volume: 1] 0:0:10 ;fade is possible to set even during 'play' command ]
sound, drum, music and channel would be handles to appropriate native structures. Wrapping them in object is interesting idea, but I'm far to know, how to do it.money!, maybe we can have him look at audio a bit.audio://device:channelwrite at audio://device position samplesample is prepared out-of-band?position is just a series offset.