#1503: MediaPlayer doesn't remember previous volume setting --------------------------------------+------------------------------------- Reporter: scottmc | Owner: leavengood Type: enhancement | Status: in-progress Priority: normal | Milestone: R1 Component: Applications/MediaPlayer | Version: R1/pre-alpha1 Keywords: | Blockedby: Platform: All | Blocking: --------------------------------------+------------------------------------- Comment(by stippi): I believe the Controller has the volume as float between 0 and 1. So using int64 as attribute type and converting it via (int) will not work. I don't understand the first two hunks of the patch. Why do you need fLastPlaylistItem at all? Restoring the volume from the attribute when the playlist item is opened is correct. However, you also need to actually store the volume when it changes. Here is what I think about volume on items: The user has a very easy way to change the global volume of the system. Changing the volume in MediaPlayer could work as an adjustment, i.e. when the volume is not properly normalized in the file. Or with quite loud files where the waveform has a lot of energy across many frequency bands. With these things in mind, I believe the MediaPlayer should apply the volume of the previous song to the next song, but only as long as it's still the same album (i.e. within the same folder on disk). The right place to add this knowledge would be the Playlist, IMHO. One last remark... if you indeed need to reference a PlaylistItem pointer, it needs to be a reference. The code directly above your first hunk shows how to do that. This is important, since PlaylistItems are refernce counted, across different threads even. (PlaylistWindow and MainWin are two threads messing with the Playlist.) -- Ticket URL: <http://dev.haiku-os.org/ticket/1503#comment:6> Haiku <http://dev.haiku-os.org> Haiku - the operating system.