Closed Bug 135593 Opened 22 years ago Closed 19 years ago

[RFE] Option to play user-defined sound file for alarm (WAV+)

Categories

(Calendar :: General, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: xyzzy, Assigned: jminta)

Details

Attachments

(2 files)

While I'm sure a better default alarm sound is on the way, it would also be nice
for the user to specify a sound to play instead of the default.  This would be
configured in the prefs, with a "Browse..." button to select the file.  As a
minimum, I'm requesting the ability to play WAV files, but any other formats
with the same interface would be nice as well.
dup bug 135558
It is possible to have only the default sound, but selectively enable/disable
it, and it is also possible to configure alternate sounds but only be able to
apply it globally.  Since either could be marked fixed without affecting the
other, I filed two bugs.  If they are both implemented together, so much the
better!  :)
Someone please feel free to take this.
Assignee: mikep → nobody
Or launch a player eg. ogg123 to listen to an internet radio in the morning. In
fact this gives the posibility to use MC as a personal cron and run any commands.
I would suggest the following options for the alarm sound:
a) "No sound"
b) "Play beep": for the typical pc beep, no soundcard needed
c) "Same as Mozilla/Thunderbird" use the new mail sound
d) "Play sound" with a user selectable WAV, empty for the default sound.wav
   I think it is important that normal users do not have to mess around with the
.jar file for just another sound

Additionally for c and d:
if no soundcard is found (=unable to play WAV), fallback to beep
if the WAV isn't found, fallback to the default sound.wav (this would also help
bug 135558 with sounds of download events that are not avaiable)
A first, rough attempt at getting this going.  Pavlov, since you seem to be
handling the new alarm system, I hoped to get your review.
-The UI needs work.  I've quickly learned how terrible I am at designing this
sort of thing properly, so please tell me how I should rearrange the widgets. 
A screenshot of how I have them looking now is at
http://www.nd.edu/~jminta/sunbird/alarmsound.png
-Since the alarms on trunk aren't finished yet, I tested this with
cal-2005011113 for firefox/linux, by hacking the calendarEvent.js file.  I'll
attach the diff for the test in a moment, since something similar could be used
in the new alarm system.  The test function uses try/catch to handle the case
where the user chooses 'play a sound' but doesn't pick a file.	I'm not sure if
this is the best way to address this issue.
-It's not too much trouble to bring in stuff for bug 250146 (Alarm sound
repetition), if you want I can do that too.
Assignee: nobody → jminta
Status: NEW → ASSIGNED
Attachment #182866 - Flags: first-review?(pavlov)
Attached file CalendarEvent.js testing diff —
Comment on attachment 182866 [details] [diff] [review]
Custom Alarm Sound (first attempt)

I somehow missed this patch...	the UI looks OK to me.	It is pretty similar to
how I did the sound pref in lightning.

Do you have CVS access?
Attachment #182866 - Flags: first-review?(pavlov) → first-review+
(In reply to comment #8)
> Do you have CVS access?
> 
No, I do not.
patch checked in.
joey, is this fixed now?
(In reply to comment #10)
> patch checked in.
> joey, is this fixed now?

This fixes the preferences side of things, but as far as I know, alarm
triggers/alarm dialogs aren't working on trunk.  When that gets implemented, the
play sound function should be changed from 0.2, perhaps the way the
CalendarEvent.js testing diff attached here does.  Whether or not this bug
should remain open to cover that is up for debate.
Sunbird/Calendar is going to use base/calendar-alarm-dialog which implements the
sound playing as desired.

Status: FIXED
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
The bugspam monkeys have been set free and are feeding on Calendar :: General. Be afraid for your sanity!
QA Contact: colint → general
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: