OpenBSD CVS

CVS log for src/lib/libsndio/sio_aucat.c


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.21 / (download) - annotate - [select for diffs], Fri Apr 29 08:30:48 2022 UTC (2 years, 1 month ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, HEAD
Changes since 1.20: +17 -2 lines
Diff to previous 1.20 (colored)

Add sio_flush(3) function to stop playback immediately

The new sio_flush(3) functions works the same way as sio_stop(3),
except that it doesn't wait for play buffer to be drained. Instead,
it discards its contents and returns immediately.

Revision 1.20 / (download) - annotate - [select for diffs], Sat Jan 9 08:27:24 2016 UTC (8 years, 5 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.19: +2 -1 lines
Diff to previous 1.19 (colored)

Make code fit in 80 columns, remove trailing spaces & tabs.

Revision 1.19 / (download) - annotate - [select for diffs], Sun Nov 22 12:01:23 2015 UTC (8 years, 6 months ago) by ratchov
Branch: MAIN
Changes since 1.18: +2 -2 lines
Diff to previous 1.18 (colored)

Don't remove the type component from the device string before passing
it to the *_open() functions. It's more flexible this way. No behaviour
change.

Revision 1.18 / (download) - annotate - [select for diffs], Fri Mar 7 10:17:18 2014 UTC (10 years, 3 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7, OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.17: +5 -2 lines
Diff to previous 1.17 (colored)

slightly "nicer" debug printfs

Revision 1.17 / (download) - annotate - [select for diffs], Wed Mar 5 20:40:49 2014 UTC (10 years, 3 months ago) by ratchov
Branch: MAIN
Changes since 1.16: +3 -9 lines
Diff to previous 1.16 (colored)

- use relative read/write positions to keep track of buffer
  usage as seen by the caller
- refresh current position before reading/writing data, to keep the
  current position always consistent with read & write pointers
- fix confusion between processed samples by the hardware (as reported
  by GET{I,O}OFFS) and samples played as reported by GETINFO(). Fixes
  incorrect delta propagated after xruns in play-only and rec-only
  modes
- don't wait for POLLIN or POLLOUT to be set to refresh ring pointers,
  as they may not be set in certain cases. Fixes sndiod crash after
  few days of continuous playback.
- save current parameters instead of calling getpar() too often

Revision 1.16 / (download) - annotate - [select for diffs], Fri Dec 20 08:51:28 2013 UTC (10 years, 5 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.15: +4 -4 lines
Diff to previous 1.15 (colored)

Be less verbose when SNDIO_DEBUG=1 is set.

Revision 1.15 / (download) - annotate - [select for diffs], Wed Nov 13 22:38:22 2013 UTC (10 years, 6 months ago) by ratchov
Branch: MAIN
Changes since 1.14: +20 -20 lines
Diff to previous 1.14 (colored)

Prefix by '_' symbols that are not part of the API.

ok deraadt, guenther

Revision 1.14 / (download) - annotate - [select for diffs], Fri Nov 23 06:40:26 2012 UTC (11 years, 6 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.13: +2 -2 lines
Diff to previous 1.13 (colored)

Make the client wait for the first flow control message rather than
assuming it can send a full initial data buffer. This requires protocol
version bump (but no library version bump).

Revision 1.13 / (download) - annotate - [select for diffs], Fri Nov 2 10:24:58 2012 UTC (11 years, 7 months ago) by ratchov
Branch: MAIN
Changes since 1.12: +16 -23 lines
Diff to previous 1.12 (colored)

Use dedicated messages for flow control instead of abusing clock tick
messages and enable flow control for MIDI. Since this requires protocol
version bump, both sndiod and libsndio must be kept up to date to work
together.

Revision 1.12 / (download) - annotate - [select for diffs], Sat Oct 27 11:56:04 2012 UTC (11 years, 7 months ago) by ratchov
Branch: MAIN
Changes since 1.11: +2 -1 lines
Diff to previous 1.11 (colored)

include netinet/in.h to get htons & friends prototypes

Revision 1.11 / (download) - annotate - [select for diffs], Sun Sep 2 15:57:06 2012 UTC (11 years, 9 months ago) by ratchov
Branch: MAIN
Changes since 1.10: +12 -1 lines
Diff to previous 1.10 (colored)

Be nice with the server and align data packets to audio block boundary

Revision 1.10 / (download) - annotate - [select for diffs], Wed Apr 11 06:05:43 2012 UTC (12 years, 2 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.9: +11 -11 lines
Diff to previous 1.9 (colored)

Use "unsigned int" rather than "unsigned". No object change.
suggested by deraadt@

Revision 1.9 / (download) - annotate - [select for diffs], Tue Nov 15 08:05:22 2011 UTC (12 years, 6 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.8: +4 -4 lines
Diff to previous 1.8 (colored)

Add a "device number" component in sndio(7) device names, allowing a
single aucat instance to handle all audio and MIDI services. Since
this partially breaks compatibility, this is a opportunitiy to fix few
other design mistakes (eg ':' being used by inet6, type name vs api
name confusion, etc..). This leads to the following names:

        type[@hostname][,unit]/devnum[.option]

The device number is the minor device number for direct hardware
access (ie the 'N' in /dev/audioN). For aucat, this is the occurence
number of the -f (or -M) option.

There's a compatibility hook to keep old names working if only one
aucat server is running.

Revision 1.8 / (download) - annotate - [select for diffs], Mon Oct 17 21:09:11 2011 UTC (12 years, 7 months ago) by ratchov
Branch: MAIN
Changes since 1.7: +2 -2 lines
Diff to previous 1.7 (colored)

Remove midicat since aucat can now be used instead of midicat
with almost the same syntax (roughly an extra -M option).
Thru boxes are created with aucat, and corresponding MIDI port
names have the "aucat" prefix instead of "midithru". The old
device name will still work some time for backward compatibility.

ok deraadt

Revision 1.7 / (download) - annotate - [select for diffs], Fri Jun 3 18:09:25 2011 UTC (13 years ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.6: +5 -1 lines
Diff to previous 1.6 (colored)

don't forget to send the initial clock tick

Revision 1.6 / (download) - annotate - [select for diffs], Mon May 2 22:32:29 2011 UTC (13 years, 1 month ago) by ratchov
Branch: MAIN
Changes since 1.5: +35 -29 lines
Diff to previous 1.5 (colored)

Add missing byter order conversions in message headers. Fixes the case
when the server and the client are not of the same endianness.
Found by naddy.

Revision 1.5 / (download) - annotate - [select for diffs], Mon Apr 18 23:57:35 2011 UTC (13 years, 1 month ago) by ratchov
Branch: MAIN
Changes since 1.4: +2 -2 lines
Diff to previous 1.4 (colored)

slightly cleanup by separating socket-specific code from
protocol specific code. No behaviour change

Revision 1.4 / (download) - annotate - [select for diffs], Sat Apr 16 11:51:47 2011 UTC (13 years, 1 month ago) by ratchov
Branch: MAIN
Changes since 1.3: +2 -2 lines
Diff to previous 1.3 (colored)

for unix domain socket addresses use AUCAT_PATH and MIDICAT_PATH
macros instead of hardcoded strings. No object change

Revision 1.3 / (download) - annotate - [select for diffs], Sat Apr 16 11:24:18 2011 UTC (13 years, 1 month ago) by ratchov
Branch: MAIN
Changes since 1.2: +1 -15 lines
Diff to previous 1.2 (colored)

Since aucat supports any parameter combination sio_getcap() doesn't
need to query the server for supported parameters. So stop using the
AMSG_GETCAP message, and remove it completely from the aucat protocol.

Revision 1.2 / (download) - annotate - [select for diffs], Sat Apr 16 10:52:22 2011 UTC (13 years, 1 month ago) by ratchov
Branch: MAIN
Changes since 1.1: +123 -384 lines
Diff to previous 1.1 (colored)

Make aucat audio and midi backends share the same code to communicate
with the server. As we're at it use the same protocol for midi and
audio. Now, both audio and midi code use the same SNDIO_DEBUG environment
variable to turn on/off DPRINTF's.

Revision 1.1 / (download) - annotate - [select for diffs], Fri Apr 8 11:18:07 2011 UTC (13 years, 2 months ago) by ratchov
Branch: MAIN

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.

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.