From 9179828535e1bb31abd3ee05e91c60f0619af131 Mon Sep 17 00:00:00 2001 From: Grazvydas Ignotas Date: Tue, 16 Apr 2013 22:55:13 +0300 Subject: [PATCH] libsdl-mixer: fix seek bug for good --- .../libsdl-mixer/fix_ogg_tremor_seek.hg.patch | 21 +++++++++++++++++++ recipes/libsdl/libsdl-mixer_1.2.12.bb | 3 +++ 2 files changed, 24 insertions(+) create mode 100644 recipes/libsdl/libsdl-mixer/fix_ogg_tremor_seek.hg.patch diff --git a/recipes/libsdl/libsdl-mixer/fix_ogg_tremor_seek.hg.patch b/recipes/libsdl/libsdl-mixer/fix_ogg_tremor_seek.hg.patch new file mode 100644 index 0000000000..af8f2ff66c --- /dev/null +++ b/recipes/libsdl/libsdl-mixer/fix_ogg_tremor_seek.hg.patch @@ -0,0 +1,21 @@ +# HG changeset patch +# User Grazvydas Ignotas +# Date 1366130283 -10800 +# Node ID 73fc977440fec551b070a9d235334f809ad196f1 +# Parent 05d12cea02531a39ef38d5432cb5de873d8df0af +Fix ogg seek when tremor is used + +ov_time_seek takes milliseconds, not seconds. + +diff -r 05d12cea0253 -r 73fc977440fe music_ogg.c +--- a/music_ogg.c Tue Feb 26 16:53:06 2013 -0800 ++++ b/music_ogg.c Tue Apr 16 19:38:03 2013 +0300 +@@ -225,7 +225,7 @@ + void OGG_jump_to_time(OGG_music *music, double time) + { + #ifdef OGG_USE_TREMOR +- vorbis.ov_time_seek( &music->vf, (ogg_int64_t)time ); ++ vorbis.ov_time_seek( &music->vf, (ogg_int64_t)(time * 1000.0) ); + #else + vorbis.ov_time_seek( &music->vf, time ); + #endif diff --git a/recipes/libsdl/libsdl-mixer_1.2.12.bb b/recipes/libsdl/libsdl-mixer_1.2.12.bb index 8fecd83a41..414b95a88f 100644 --- a/recipes/libsdl/libsdl-mixer_1.2.12.bb +++ b/recipes/libsdl/libsdl-mixer_1.2.12.bb @@ -4,8 +4,11 @@ DEPENDS = "virtual/libsdl flac libmikmod libvorbis ${@base_conditional('ENTERPR LICENSE = "zlib" LIC_FILES_CHKSUM = "file://COPYING;md5=a37a47a0e579e461474cd03b9e05199d" +PR = "r2" + SRC_URI = "http://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-${PV}.tar.gz \ file://configure.patch;patch=1 \ + file://fix_ogg_tremor_seek.hg.patch;patch=1 \ " SRC_URI[md5sum] = "e03ff73d77a55e3572ad0217131dc4a1" -- 2.39.5