• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Snack library for tcltk - CoreAudio Issues
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Snack library for tcltk - CoreAudio Issues


  • Subject: Snack library for tcltk - CoreAudio Issues
  • From: Richard Dobson <email@hidden>
  • Date: Thu, 10 Dec 2009 10:30:05 +0000

Hello all,

we (CDP) have a large program implemented in tcltk, that relies on the Snack audio toolkit (no longer maintained by its original author Kare Solander) for some of its audio output and signal display tasks.

The last published version of Snack is 2.2.10, see:
http://www.speech.kth.se/snack

We have only relatively recently supported OS X, and it is now clear that when the audio works it is simply because we have been lucky (playing 44100 stereo). The CoreAudio implementation in Snack is very old (2004 or so) and has the following negative aspects:

* uses deprecated APIs ; e.g. AudioDeviceAddIOProc, sets hardware srate, no Converter.
* nowhere does it call SetProperty to set a sample rate!
* relies on global static arrays [44100*2]; which I suspect may be why it goes very wrong at high srates (96KHz).
* does not know about multi-channel devices (e.g. my firewire 410)



I have hacked the code to solve (up to a point) the most pressing issues; audio now plays out over N channels cleanly (but missing a first block of data the first time), whereas it was mere garbled noise before, but it is hardly "correct" (96KHz still wrong) - really it needs to be completely rewritten to use the modern APIs. And suffice it to say, modern devices do not take that kindly to rapid-fire hardware srate changes.


There is a further issue on Snow Leopard in that while Snack is provided with the 8.4.19 version of tcltk, it is absent altogether in the default 8.5.7 version. Ostensibly, not only do we need a new implementation of audio in Snack, we need a version of the dylib with the 64bit architecture to use under Snow Leopard.

Previously I have had to avoid 8.5.x version so tcltk on OS X because in that case the waveform/spectrum displays don't work - we just get a black rectangle. out current situation is that our standalone app version (with 32bit tcltk 8.4.19 internally) runs, with the aboce audio issues, on Snow leopard, the source version cannot start as it can't find the Snack library.

Before I make my first foray into formal bug reporting, I have two questions:

Is Apple actively supporting tcltk in general, and Snack in particular, by building it in-house, or is it simply taking the external release "as is"? A post to the comp.lang.tcl list has had no responses. Was there some non-trivial technical reason why Snack was left out of 8.5.7?

Is there anyone on this list who has any time at all to look at the audio code and contribute a modern replacement to the tcl/Snack community? I am too low on the learning curve to do that reliably in any reasonable timescale. For me it is "an exercise"; for an experienced CoreAudio developer it may be the work of a few evenings. An alternative that might be worth considering is simply to replace all the audio code (for all platforms) with calls to portaudio.

Richard Dobson





_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: AVAudioPlayer playback via speaker?
  • Next by Date: Re: AVAudioPlayer playback via speaker?
  • Previous by thread: Re: Problem with Set/Get volume of input device with single channel
  • Next by thread: can't seem to get kAudioFileStreamProperty_BitRate
  • Index(es):
    • Date
    • Thread