OpenBSD CVS

CVS log for src/lib/libsndio/Attic/sndio.c


[BACK] Up to [local] / src / lib / libsndio

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.28, Fri Apr 8 11:18:07 2011 UTC (13 years, 2 months ago) by ratchov
Branch: MAIN
CVS Tags: HEAD
Changes since 1.27: +1 -1 lines
FILE REMOVED

Clean up function naming: use sio_<backend>_ prefix for private
audio-related functions and put them in files named sio_<backend>.c
No behaviour changes.

Revision 1.27 / (download) - annotate - [select for diffs], Sat Nov 6 20:25:42 2010 UTC (13 years, 7 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.26: +8 -123 lines
Diff to previous 1.26 (colored)

make sio_onvol(3) return a integer exposing whether a volume knob
is available for the stream. As we're at it, remove macros and
functions that are neither used nor documented.

Revision 1.26 / (download) - annotate - [select for diffs], Fri Aug 20 06:56:53 2010 UTC (13 years, 9 months ago) by ratchov
Branch: MAIN
Changes since 1.25: +5 -2 lines
Diff to previous 1.25 (colored)

polish the code: remove few unused #includes, add missing ones,
fix NULL vs 0, etc. No behaviour change.

Revision 1.25 / (download) - annotate - [select for diffs], Sat Apr 24 06:15:54 2010 UTC (14 years, 1 month ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.24: +9 -9 lines
Diff to previous 1.24 (colored)

remove trailing spaces, from Alexandr Shadchin, thanks

Revision 1.24 / (download) - annotate - [select for diffs], Tue Apr 6 20:07:01 2010 UTC (14 years, 2 months ago) by ratchov
Branch: MAIN
Changes since 1.23: +2 -2 lines
Diff to previous 1.23 (colored)

aucat (server):

  - 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@

Revision 1.23 / (download) - annotate - [select for diffs], Fri Aug 28 10:52:14 2009 UTC (14 years, 9 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.22: +1 -5 lines
Diff to previous 1.22 (colored)

don't consider calling sio_close() without calling sio_stop() first
as a programming error. At any stage the program should be alble to
cleanly free resources and close the device.

Revision 1.22 / (download) - annotate - [select for diffs], Fri Aug 28 06:37:06 2009 UTC (14 years, 9 months ago) by ratchov
Branch: MAIN
Changes since 1.21: +5 -1 lines
Diff to previous 1.21 (colored)

add a new AMSG_BYE, sent by the client to requst the server to
free resources and drop the connection. This allows the client
to ensuire that at any time it's using only one connection, thus
only one MIDI control channel.

Revision 1.21 / (download) - annotate - [select for diffs], Mon Jul 27 06:30:34 2009 UTC (14 years, 10 months ago) by ratchov
Branch: MAIN
Changes since 1.20: +2 -2 lines
Diff to previous 1.20 (colored)

don't use ``return'' in sio_close() and mio_close()

Revision 1.20 / (download) - annotate - [select for diffs], Sun Jul 26 15:50:04 2009 UTC (14 years, 10 months ago) by ratchov
Branch: MAIN
Changes since 1.19: +3 -3 lines
Diff to previous 1.19 (colored)

more style improvemets, from Thomas Pfaff

Revision 1.19 / (download) - annotate - [select for diffs], Sun Jul 26 13:33:30 2009 UTC (14 years, 10 months ago) by ratchov
Branch: MAIN
Changes since 1.18: +3 -3 lines
Diff to previous 1.18 (colored)

use ``sizeof(string) - 1'' rather than ``strlen(string)'' on static
strings. suggested by Thomas Pfaff

Revision 1.18 / (download) - annotate - [select for diffs], Sun Jul 26 12:38:20 2009 UTC (14 years, 10 months ago) by ratchov
Branch: MAIN
Changes since 1.17: +4 -2 lines
Diff to previous 1.17 (colored)

sort and space headers as per style(9)
from Thomas Pfaff

Revision 1.17 / (download) - annotate - [select for diffs], Sat Jul 25 11:15:56 2009 UTC (14 years, 10 months ago) by ratchov
Branch: MAIN
Changes since 1.16: +4 -4 lines
Diff to previous 1.16 (colored)

use const qualifier in libsndio, making it slightly more consistent
with open(2) and write(2) syscalls.
from Thomas Pfaff, jakemsr is fine with it

Revision 1.16 / (download) - annotate - [select for diffs], Sat Jul 25 08:44:27 2009 UTC (14 years, 10 months ago) by ratchov
Branch: MAIN
Changes since 1.15: +38 -8 lines
Diff to previous 1.15 (colored)

Currently midi capable programs can control midi hardware, but
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@

Revision 1.15 / (download) - annotate - [select for diffs], Fri May 15 13:04:52 2009 UTC (15 years, 1 month ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.14: +49 -47 lines
Diff to previous 1.14 (colored)

if DEBUG is defined, use a global debug level rather
than a per-stream debug level. No behaviour change.

Revision 1.14 / (download) - annotate - [select for diffs], Mon Feb 9 07:00:27 2009 UTC (15 years, 4 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_4_5_BASE, OPENBSD_4_5
Changes since 1.13: +3 -3 lines
Diff to previous 1.13 (colored)

ignore evironment variables if the program is setuid or setgid
explained by deraadt, ok miod, ok millert

Revision 1.13 / (download) - annotate - [select for diffs], Sat Jan 10 20:34:44 2009 UTC (15 years, 5 months ago) by ratchov
Branch: MAIN
Changes since 1.12: +2 -2 lines
Diff to previous 1.12 (colored)

make all private functions static

Revision 1.12 / (download) - annotate - [select for diffs], Sat Dec 27 11:35:50 2008 UTC (15 years, 5 months ago) by ratchov
Branch: MAIN
Changes since 1.11: +3 -3 lines
Diff to previous 1.11 (colored)

when using the aucat(1) backend, don't mask the POLLHUP bit
even if the device is not started yet. This way, if the server
is killed programs can notice it.

Revision 1.11 / (download) - annotate - [select for diffs], Sun Dec 21 10:03:25 2008 UTC (15 years, 5 months ago) by ratchov
Branch: MAIN
Changes since 1.10: +2 -2 lines
Diff to previous 1.10 (colored)

fix more spelling errors and typos,
from Thomas Pfaff <tpfaff(at)@tp76.info>, thanks

Revision 1.10 / (download) - annotate - [select for diffs], Wed Dec 17 10:00:50 2008 UTC (15 years, 5 months ago) by ratchov
Branch: MAIN
Changes since 1.9: +41 -34 lines
Diff to previous 1.9 (colored)

stop using stderr in the library, wrap all diagnostic fprintfs
so they are visible only when the DEBUG macro is #defined
and SIO_DEBUG env. variable is set.
requested by many, discussed with jakemsr

Revision 1.9 / (download) - annotate - [select for diffs], Wed Dec 17 07:31:38 2008 UTC (15 years, 5 months ago) by ratchov
Branch: MAIN
Changes since 1.8: +8 -8 lines
Diff to previous 1.8 (colored)

fix spell errors, from Thomas Pfaff <tpfaff(at)tp76.info>, thanks!

Revision 1.8 / (download) - annotate - [select for diffs], Wed Dec 17 07:19:27 2008 UTC (15 years, 5 months ago) by ratchov
Branch: MAIN
Changes since 1.7: +7 -3 lines
Diff to previous 1.7 (colored)

add a writable ``appbufsz'' field to the sa_par structure, containing
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

Revision 1.7 / (download) - annotate - [select for diffs], Thu Nov 20 16:31:26 2008 UTC (15 years, 6 months ago) by ratchov
Branch: MAIN
Changes since 1.6: +3 -1 lines
Diff to previous 1.6 (colored)

make both aucat(1) and audio(4) backends use the AUDIODEVICE env
variable to determine the socket or the device to use. Allow
choosing the when aucat(1) is used too. Noticed and
tested by naddy@

Revision 1.6 / (download) - annotate - [select for diffs], Tue Nov 11 19:39:35 2008 UTC (15 years, 7 months ago) by ratchov
Branch: MAIN
Changes since 1.5: +38 -6 lines
Diff to previous 1.5 (colored)

expose a volume knob in the sndio API: add sio_setvol(3) and
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

Revision 1.5 / (download) - annotate - [select for diffs], Sun Nov 9 15:32:50 2008 UTC (15 years, 7 months ago) by ratchov
Branch: MAIN
Changes since 1.4: +3 -1 lines
Diff to previous 1.4 (colored)

if the device is not started, make sio_pollfd() pass 0 events bitmap
to the backend to avoid reporing the device as writable when it's
stopped. Solves 100% CPU usage of apps poll()ing a stopped device.

Revision 1.4 / (download) - annotate - [select for diffs], Sun Nov 9 12:22:27 2008 UTC (15 years, 7 months ago) by ratchov
Branch: MAIN
Changes since 1.3: +3 -1 lines
Diff to previous 1.3 (colored)

sio_revents() should return 0 poll events if the device isn't started

Revision 1.3 / (download) - annotate - [select for diffs], Fri Nov 7 21:01:15 2008 UTC (15 years, 7 months ago) by ratchov
Branch: MAIN
Changes since 1.2: +2 -2 lines
Diff to previous 1.2 (colored)

expose the block size in the sndio API by making par->round writable
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@

Revision 1.2 / (download) - annotate - [select for diffs], Tue Oct 28 23:00:08 2008 UTC (15 years, 7 months ago) by jsg
Branch: MAIN
Changes since 1.1: +2 -3 lines
Diff to previous 1.1 (colored)

sio_initpar() is supposed to return void like the documentation
says according to ratchov@.  Make it so, and crank major.

ok ratchov@

Revision 1.1 / (download) - annotate - [select for diffs], Mon Oct 27 00:26:33 2008 UTC (15 years, 7 months ago) by ratchov
Branch: MAIN

rename libsa to libsndio
requested by many, "just go for it" deraadt@

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.