MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001634VCMISound, music, videospublic2013-12-27 12:202022-12-17 14:06
ReporterIvan 
Assigned ToIvan 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version0.94 
Target VersionFixed in Version1.next 
Summary0001634: Music should not restart in some cases
DescriptionIn some cases music should not restart but resume from position on which it paused last time.

Music should resume:
- Towns
- Terrain tracks
- AI themes

Music should restart
- Main menu / campaigns menu
- Battles

(please check if I missed any other music groups)
TagsNo tags attached.
Attached Files

- Relationships
related to 0001978resolvedIvan Music should not restart or pause if player changed to other town of same type 
related to 0002207resolvedIvan Music stops on town switching 

-  Notes
(0004209)
Ivan (developer)
2013-12-27 12:21

Needs some investigation in SDL_Mixer API - currently implementing straightforward approach may be too memory-heavy - right now vcmi keeps whole music file in memory. And keeping all paused tracks in memory would use huge amount of memory.
(0006248)
SXX (administrator)
2016-01-06 05:22
edited on: 2016-01-06 07:46

More details on this issue.

SDL_mixer do stream "Music" (but not effects) by default, but in VCMI file loading is implemented via CResourceHandler that load whole file in memory. So we probably need to rework it somehow so SDL_mixer mechanisms works and then store every "MusicEntry" in memory so they always stopped/resume on correct positions.

PS: I posted it because SDL_mixer documentation doesn't clearly state that streaming is used for music while confirmation of this can be found on mailing list and in code too (I almost sure it's does streaming :-p).

So before I find out about streaming support I think to implement some function to save music position and restart from it next time, but considering SDL doesn't use tons of memory on it's own it's better to rework playback instead.

(0008386)
Ivan (developer)
2022-12-17 14:06

Fixed in 1.1

- Issue History
Date Modified Username Field Change
2013-12-27 12:20 Ivan New Issue
2013-12-27 12:20 Ivan Assigned To => Ivan
2013-12-27 12:20 Ivan Status new => assigned
2013-12-27 12:21 Ivan Note Added: 0004209
2014-11-24 16:15 SXX Relationship added related to 0001978
2015-12-14 10:07 SXX Relationship added related to 0002207
2016-01-06 05:22 SXX Note Added: 0006248
2016-01-06 05:24 SXX Note Edited: 0006248 View Revisions
2016-01-06 07:43 SXX Note Edited: 0006248 View Revisions
2016-01-06 07:46 SXX Note Edited: 0006248 View Revisions
2022-12-17 14:06 Ivan Assigned To Ivan =>
2022-12-17 14:06 Ivan Note Added: 0008386
2022-12-17 14:06 Ivan Status assigned => closed
2022-12-17 14:06 Ivan Assigned To => Ivan
2022-12-17 14:06 Ivan Resolution open => fixed
2022-12-17 14:06 Ivan Fixed in Version => 1.next

Site | Forums | Wiki | Slack | GitHub


Copyright © 2000 - 2024 MantisBT Team
Hosting provided by DigitalOcean