Am Dienstag, den 07.10.2008, 22:36 +0200 schrieb Thomas Treichl:
> Thomas Weber schrieb:
> > Thomas,
> > you are cc'd as you moved 'ofsndplay' from the MacOSX package into
> > audio.
> >
> > On Sat, Sep 06, 2008 at 02:33:33PM +0200, Søren Hauberg wrote:
> >> lør, 06 09 2008 kl. 14:16 +0200, skrev Thomas Weber:
> >>> The global variable makes it more difficult to fix this in a simple way;
> >>> but that is the package's maintainer decision.
> >> I don't think Paul is actively maintaining the package anymore (I'm not
> >> sure though...), so I don't think we should let the maintainer
> >> decide :-)
> >> If I understand you correctly the audio package defaults to using
> >> "ofsndplay" which only works on a Mac, and you want to change it to
> >> "play" which (I'm guessing) only works on Linux/BSD. Is that correct?
> >
> > Actually it's not what I wanted, but I just realized that the patch does
> > just that. Sigh, more work ahead.
> >
> >
> >> If so, it might be better to let the default value depend on the
> >> Operating System, i.e. something like
> >>
> >> if (ismac ())
> >> sound_play_utility = "ofsndplay";
> >> else
> >> sound_play_utility = "play -t AU -";
> >> endif
> >>
> >> Or perhaps I'm misunderstanding things here...
> >
> > No, you are correct.
> >
> > I guess the best way is to get rid of the global sound_play_utility
> > variable and let the sound.m check for the existence of 'ofsndplay' or
> > 'play' respectively. We can still check for the global variable, such
> > that the user can override the checks; but we shouldn't set it
> > ourselves.
> >
> > Thomas, can you post the output of
> >
> > octave:2> file_in_path(EXEC_PATH, "play")
> > octave:3> file_in_path(EXEC_PATH, "ofsnplay")
> >
> > on your Mac?
> >
> > Thomas
>
> Hi Thomas, Soren,
>
> I've been on a journey, that's why my answer comes so late. The ofsndplay
> utility is compiled from the file audio/src/OFSndPlay.cc file (which actually
> is
> an ObjC source file) *if* the package is installed on a Mac.
Yes, but pkg.m scans the .cc files for PKG_ADD directives. So the
PKG_ADD command from OFSndPlay.cc ends up in the package, no matter
where you compile it (have a look at the create_pkgadddel() function in
pkg.m).
> Can you once again tell me why you see the 'ofsndplay' utility on Linux - I
> can't find the origin of that problem and why this happens?
// PKG_ADD: global sound_play_utility="ofsndplay -";
from OFSndPlay.cc ends up in audio's PKG_ADD file. This sets the global
variable unconditionally.
Just load the package on Mac, the sound_play_utility variable should be
set even if you don't have the ofsndplay utility installed.
> I think Soren's idea
> (using the ismac() function) fits very well here if the global variable
> should
> be removed. Can somebody make the necessary changes?
I'll try to remember it, but I'm currently swamped (and this will
continue for a few months).
Thomas
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Octave-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/octave-dev