sox-devel@lists.sourceforge.net unofficial mirror
 help / color / mirror / code / Atom feed
From: Jan Stary <hans@stare.cz>
To: sox-devel@lists.sourceforge.net
Subject: SUN audio
Date: Mon, 3 Jun 2024 21:03:35 +0200	[thread overview]
Message-ID: <Zl4Th2QGQGEY7Hen@www.stare.cz> (raw)

Dear all,

one of the audio outputs SoX supports is sunaudio.
Are there any SunOS (Solaris) users of SoX?
(Assuming there are still users of Solaris at all.)

I have remote access to this one SunOS 5.11 box,
which has no audio HW and no /dev/audio,
so I have no way to tell whether sunaudio works.

Below please find a micro program I use to detect
the presence of SUN audio: if this compiles, runs
and returns zero, you have a working sunaudio;
if any of that fails, you don't.

If you are running the new build system
https://github.com/janstary/sox/tree/build
(please test on every system you use SoX on)
it is already in,

https://github.com/janstary/sox/commit/d4e4f6997bd5d8803d6a245743edd538b06bfe48
https://github.com/janstary/sox/issues/17

so ./configure will run this for you: look at the sunaudio line,
and if it fails, look for sunaudio in config.log

If you are not running the new build system,
you can compile this separately (no extra lib needed).

As for sunaudio.c itself, is has last been touched in 2020
fixing a size bug, and in 2012 before that. Granted, both
Solaris and Sun Microsystems were already dead by then,
so perhaps nothing has changed, but please confirm
explicitly whether sun audio (both the detection
and the driver) works for you.

	Thank you

		Jan

#include <sys/audioio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>

int
main(void)
{
	int device;
	audio_info_t info;

	if ((device = open("/dev/audio", O_RDONLY)) == -1)
		return 1;

	if (ioctl(device, AUDIO_GETINFO, &info) == -1)
		return 1;

	info.record.encoding = AUDIO_ENCODING_ULAW;
	info.record.sample_rate = 8000;
	info.record.precision = 8;
	info.record.channels = 1;

	if (ioctl(device, AUDIO_SETINFO, &info) == -1)
		return 1;

	return 0;
}


_______________________________________________
SoX-devel mailing list
SoX-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-devel

             reply	other threads:[~2024-06-03 19:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-03 19:03 Jan Stary [this message]
2024-06-04 14:04 ` SUN audio Jan Stary

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.sourceforge.net/lists/listinfo/sox-devel

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Zl4Th2QGQGEY7Hen@www.stare.cz \
    --to=sox-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/sox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).