View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004542 | The Dark Mod | Sound System | public | 12.06.2017 08:04 | 13.06.2017 17:26 |
Reporter | stgatilov | Assigned To | stgatilov | ||
Priority | normal | Severity | feature | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Target Version | TDM 2.06 | Fixed in Version | TDM 2.06 | ||
Summary | 0004542: Support playing stereo sound in cinematics | ||||
Description | Currently the cinematics plays sound in the simplest way possible: as mono. If video file contains stereo sound stream, it is anyway converted to mono using swresample library. We should allow playing at least stereo sound from video file. In the simplest case we can always convert sound to stereo using swresample (should work without problem even if source is mono). A bit more complicated idea is to look whether the source stream is stereo or beyond, and return stereo data only in this case. | ||||
Tags | No tags attached. | ||||
Attached Files | CinematicsToMono.patch (916 bytes)
Index: renderer/CinematicFFMpeg.cpp =================================================================== --- renderer/CinematicFFMpeg.cpp (revision 6935) +++ renderer/CinematicFFMpeg.cpp (working copy) @@ -829,7 +829,7 @@ _path = qpath; _looping = looping; _withAudio = withAudio; - _channels = 2; + _channels = 1; bool res = false; if (r_cinematic_checkImmediately.GetBool()) { Index: sound/snd_cache.cpp =================================================================== --- sound/snd_cache.cpp (revision 6935) +++ sound/snd_cache.cpp (working copy) @@ -433,7 +433,7 @@ cinematic = cin; objectInfo.wFormatTag = WAVE_FORMAT_TAG_STREAM_CINEMATICS; - objectInfo.nChannels = 2; //stereo + objectInfo.nChannels = 1; //mono objectInfo.nSamplesPerSec = PRIMARYFREQ; //44100 hz objectInfo.nAvgBytesPerSec = 0; //nobody cares objectInfo.nBlockAlign = sizeof(float) * objectInfo.nChannels; | ||||
Done in svn rev 6935. Now cinematics always produces stereo output. Even if the video file contains mono, swresample library would convert them to stereo =) |
|
In case of any possible trouble with stereo: I have attached a minimal TortoiseSVN patch which switches cinematics back to mono output ("CinematicsToMono.patch"). | |
Date Modified | Username | Field | Change |
---|---|---|---|
12.06.2017 08:04 | stgatilov | New Issue | |
12.06.2017 08:04 | stgatilov | Status | new => assigned |
12.06.2017 08:04 | stgatilov | Assigned To | => stgatilov |
12.06.2017 08:04 | stgatilov | Relationship added | related to 0004534 |
13.06.2017 17:24 | stgatilov | Note Added: 0008909 | |
13.06.2017 17:24 | stgatilov | File Added: CinematicsToMono.patch | |
13.06.2017 17:26 | stgatilov | Note Added: 0008910 | |
13.06.2017 17:26 | stgatilov | Status | assigned => resolved |
13.06.2017 17:26 | stgatilov | Fixed in Version | => TDM 2.06 |
13.06.2017 17:26 | stgatilov | Resolution | open => fixed |
13.06.2017 17:26 | stgatilov | Target Version | => TDM 2.06 |