| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
audio-related functions and put them in files named sio_<backend>.c
No behaviour changes.
|
|
|
|
|
| |
is available for the stream. As we're at it, remove macros and
functions that are neither used nor documented.
|
|
|
|
|
| |
and don't generate clock ticks (ie don't invoke the sio_onmove(3)
call-back).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
now), play and record directons may be out of sync, and since the play
direction is used as clock source, we may end up with data ariving
_before_ the time it was recorded. This breaks the sndio ``device
model'' and most full-duplex apps relying on it, starting with aucat
in its default mode.
Workaround this by using the direction that's ahead as clock source,
ensuring that recorded data never arrives before the clock tick it was
recorded. This prevents apps from crashing but won't fix stuttering
caused by missed interrupts.
ok deraadt@
|
|
|
|
| |
from Remco <remco at d-compu.dyndns.org>, thanks!
|
|
|
|
|
|
|
|
|
|
| |
for both structs, the new members are 'bps' and 'msb', which
describe the number of bytes per sample and data alignment in the
sample, respectively. drivers must properly set these fields in
the 'query_encoding', 'set_parameters' and 'get_default_params'
hardware interface methods.
discussed with ratchov, deraadt
|
|
|
|
|
|
|
| |
full-duplex, we may detect a xrun in the play direction and discard
the clock tick, this would cause sio_revents() to return POLLIN
without the clock being advanced, causing apps relying on the clock
for flow control to enter a busy loop.
|
|
|
|
|
|
|
|
| |
requested sample rate, scale the block/buffer sizes so the block/
buffer sizes the hardware will use are the same amount of *time*
as the requested block/buffer sizes.
ok ratchov@
|
|
|
|
|
| |
already paused (by either sio_open or sio_stop)
from Alexandr Shadchin, thanks!
|
|
|
|
|
| |
descriptor is closed. Fix from Alexandr Shadchin, together with
various simplifications.
|
|
|
|
|
| |
From Alexandr Shadchin <alexandr.shadchin at gmail.com>
Good catch!
|
|
|
|
|
|
|
| |
play parameters are set only if playback is enabled, and record
parameters are set only if recording is enabled. Fixes
sun_getcap() on devices whose play and record parameters are not
independent.
|
|
|
|
| |
set record precision.
|
| |
|
|
|
|
|
|
|
|
| |
started immediately after it's opened in record only mode.
Pause it in sio_open() and sio_stop(), since libsndio requires
an explicit call to sio_start().
discussed with jakemsr
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- make the ``-m mode'' option per subdevice, allowing
subdevices to be play-only or rec-only even if the
server is full-duplex
- add ``monitoring'' mode (with ``-m mon''). This is a
record-only stream from which played streams can be
recorded (kind of ``record what you hear'').
- allow MIDI devices to be subscribed to the controlling
MIDI port of the server, ie what midicat does (with -f
option), but using the -q option.
- add flow control to the protocol, and serialize clock
ticks (sio_onmove() calls) and data chunks. This should
fix certain full-duplex programs, broken with ``magic''
block/buffer size combinations.
- enable 3 block latency which is the minimum theoretical.
Make -z and -b options correspond to device parameters.
- make sio_getcap(3) the same for aucat and sun backends,
ie return whatever is supported (``everything'' in the
aucat case, since everything is actulally supported).
aucat (player):
- enable ``-m mode'' option to select between monitoring
and recording when ``-o file'' is used.
- plug MIDI code to non-server codepath. The MIDI control
device is specified with the ``-q device'' option, as in
server mode.
- impliment lseek()'ing within files (controlled
through MIDI). Necessary to use aucat with a MIDI
sequencer.
midicat (thrubox):
- rename ``-f'' flag to ``-q'', so it has the
same name as in aucat (-f is still working)
ok jakemsr@, tweaks from jmc@
|
|
|
|
|
| |
with precision other than 8, 16 or 32 bits.
Found by Jan Stary <hans at stare.cz>, thanks!
|
|
|
|
| |
don't call the sio_onmove() call-back with negative argument.
|
|
|
|
|
| |
precision / 8. Fixes sio_setpar() requesting smaller block sizes
on 24-bit devices.
|
|
|
|
| |
is actually linear
|
|
|
|
|
| |
AUDIO_SETINFO() to set the initial parameters, since AUDIO_SETINFO()
can fail.
|
|
|
|
|
|
|
|
| |
by the device, we may end up with different recording and playback
parameters, which will break almost all full duplex apps on such
devices. For instance, this should fix full-duplex apps not working
on devices that can record at any sample rate but can play
at 48kHz only.
|
| |
|
|
|
|
| |
from Thomas Pfaff
|
|
|
|
|
| |
with open(2) and write(2) syscalls.
from Thomas Pfaff, jakemsr is fine with it
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
cannot cooperate with other programs. The aim of this change is
to allow any program to send midi data to other programs as they
were midi hardware. For instance, this change should solve the
longstanding problem of using a midi sequencer with software
synthesizers. More precisely:
- new midicat(1) utility (actually hardlink to aucat(1)).
it creates software midi thru boxes, allowing programs
to send midi messages to other programs as they were
midi(4) hardware.
- new midi api in libsndio (see mio_open(3)), to access
midi(4) devices and midicat(1) sockets in a uniform way.
- new device naming scheme <service>:<unit>[.<option>],
common to audio and midi.
- new sndio(7) manual describing concepts and naming
The current audio device naming still works, but people having
scripts or configuration files containing device names could read
the sndio(7) man page and slowly start updating device names.
discussed with jakemsr@ and deraadt@, help form jmc@
|
| |
|
| |
|
|
|
|
| |
than a per-stream debug level. No behaviour change.
|
|
|
|
| |
ok deraadt
|
|
|
|
|
|
|
|
| |
the programs calls execvp(2), the new image can't use the device, which
stays open, so other programs get EBUSY. Set the close-on-exec flag to
avoid this.
ok jakemsr
|
| |
|
|
|
|
|
| |
possible to get them right in the current state of the mixer.
discussed with jakemsr
|
|
|
|
| |
from Thomas Pfaff <tpfaff(at)@tp76.info>, thanks
|
|
|
|
|
|
| |
so they are visible only when the DEBUG macro is #defined
and SIO_DEBUG env. variable is set.
requested by many, discussed with jakemsr
|
|
|
|
|
|
|
|
| |
the program-part of the buffer size, ie the part that is subject to
underruns. Useful for apps like cdio(1) that don't have their own
rings, or to apps that have a minimum ring size constraint. Setting
the ``bufsz'' parameter becomes deprecated.
ok jakemsr
|
|
|
|
|
|
| |
variable to determine the socket or the device to use. Allow
choosing the when aucat(1) is used too. Noticed and
tested by naddy@
|
|
|
|
|
|
| |
larger blocks the other half. That's because shrinking the block size may
not be the right direction to go to find a common block size for play and
record.
|
|
|
|
|
|
|
| |
sio_onvol(3) functions. The audio(4) backend tries to use the
inputs.dac, outputs.dac, outputs.output and outputs.master
controls (in this order). Add a sample file in
regress/lib/libsndio/vol/vol.c
|
|
|
|
|
|
|
| |
and thus remove the ugly rate <-> block-size table from
sio_setpar(3). Handle the block size negociation in aucat(1), since
it has few constrains the code is overally simpler.
ok jakemsr@, major crank suggested by deraadt@
|
|
|
|
|
|
|
|
|
| |
and block based audio i/o (arithmetic constraints). For now round the
frequency to a supported one, (ie 8kHz, 11.025kHz, 12kHz multiple), and get
the the block size from a table.
fixes problem reported by Robert <robert _at_ openbsd.pap.st>
ok jakemsr
|
| |
|
|
requested by many, "just go for it" deraadt@
|