Re: afplay
Re: afplay
- Subject: Re: afplay
- From: Bart Bunting <email@hidden>
- Date: Fri, 03 Jun 2011 20:12:41 +1000
Hi,
>From the NSSound docs it appears that the volume is a float between 0
and 1.
This works for me, as in -v 0 is silent, -v 1.0 is loud and -v 0.5 is in
between.
HTH
Bart
On Fri, 03 Jun 2011 05:00:33 -0400, "S. J. Cunningham" <email@hidden> wrote:
>
> On Jun 2, 2011, at 4:23 PM, Luther Fuller wrote:
>
> > I'm using this in a script ...
> >
> > set sndpid to do shell script "afplay -v 0.4 " & sndPath & " &> /dev/null & echo $!"
> >
> > Notice the number '0.4' after the '-v'. This number is supposed to set the playback volume. (At least, that's what the -help reveals.) However, changing the value of this number does absolutely nothing at all.
> >
> > Does anyone have any experience with afplay?
> > And what's the problem with '-v'?
>
> I don't have experience with afplay but I have a script to play an mp3 file every morning using quicktime that takes _two_ volume settings to work, viz:
>
> ...
> property sysVolMax : 100
> property qtVolMax : 256
> -- Set System Volume to Max
> set saveSysVol to output volume of (get volume settings)
> set volume output volume sysVolMax
> ...
> tell application "QuickTime Player 7"
> ...
> set sound volume of document 1 to qtVolMax
> ...
> end tell
>
> Notice that the max system volume is 100 while the max QT volume is 256. I wrote this script some time ago, so I don't remember the details of how I figured out the volume settings or why I had to set both but I remember it was a pain. Never the less it works and wakes me up every morning :-)
>
> Hope that helps. _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> Archives: http://lists.apple.com/archives/applescript-users
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden
References: | |
| >afplay (From: Luther Fuller <email@hidden>) |
| >Re: afplay (From: "S. J. Cunningham" <email@hidden>) |