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. The ofsndplay 
program then is placed into

   octave-3.1.51:12> file_in_path (EXEC_PATH, "ofsndplay")
   ans = /Users/Thomas/octave/audio-1.1.2/bin/ofsndplay

The play utility is not there on a clean Mac per default.

   octave-3.1.51:11> file_in_path (EXEC_PATH, "play")
   ans = [](0x0)

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

   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
Octave-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to