Patch for SDL_mixer

Hi,

I updated my patch to allow native midi support in SDL_mixer. It just kickes in
when timidity can’t be initialized (cfg not find etc). It’s a diff to the
current CVS version, but only the source files are included. The makefiles and
project workspaces need to be updated for it. Only music.c is changed, but there
are two new files in the native_midi directory. The native midi is currently
only implemented for Windows, because I don’t have any knowledge about midi on
other platforms.
This patch is used in PrBoom (prboom.sourceforge.net). The version attached has
a bugfix for music looping which wasn’t released yet.

Proff–
Florian ‘Proff’ Schulze - @Florian_Schulze
Homepage: - http://proff.fly.to
PGP-Key available from - http://www.keyserver.net/en/

begin 666 SDL_mixer_patch.zip
M4$L#! H"V%IBH````````````````,````;F%T:79E7VUI9&DO4$L# M!!0````(``59;"KU)*+.X@,``*8(```9````;F%T:79E7VUI9&DO;F%T:79E M7VUI9&DN:)5546_B.!!^K]3_,-(^+$4<I:U.ISM.ITLI7=!!BDBZ574Z(9-, MB+6)S=D.E#WUO]_8)D I?=A(D>*9^;Z9^3QV+IOG9T"/8(:O<%;RE/\&,& J M73.%,*8UZ&JYE,I )A68'"&Z&U'@"RHH^%PQM?$4/;G<*+[(#31Z%W#=Z70` M[@NI.!/P>:)DEGV&*,FKXCN>GWE(G'-=DP!]9 at H1M,R,3=Z%C:P@(;3"E&NC M^+PR"-P`$^FE5)ZBE"G/-M9:B11]@095J4%F;O$E?(31-L47%*A8`9-J7O#$ M$XQX at D(C, U+:]8YIC#?..R]K2?:U@/WDE*03E)T`3GYMR6L4&DRPG6=<DO9 M`A*LP8SM0X%<6N0%%;^!@E&)-:[]D1K[IE/@PC'G<DGMY<1)#:]Y4< <H=*8 M547+DU X/ WCP<-C#$'X#$_!=!J$\7.7PDTNR8LK]&2\7!:<N*DYQ8394/F> M8]R?]@8$"FZ'HV'\;-NX'\9A/XK at _F$*`4R":3SL/8Z"*4P>IY.'J-\&B!!K MP6ME3ZF^$]R.4RE)UQ0-XX7>Z?!,VZZIU"*%G*V0MC]!&LX4&"0T8S^\L844 M"]<]P?8*=X%G(*1IP5IQFB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O)^M?C<*TC3`C]G0 06.Q];A3\[ M67FY3NMN*Q=/U0,5/4;I-* F@=0<_%?0,%9SKORFG#4]=QT4_+H!Y"@4,1GC MVRS1347*VWKO8/K)ZDAY at EE-V%?)U=6CH#L<3R<DV*L038&K=G:CWU!+`0(4 M``H"V%IBH````````````````,````````````$ #_00!N871I M=F5?;6ED:2]02P$"% `4" %66PJ]22BSN(#``"F" ``&0`````````! M" MH$J````;F%T:79E7VUI9&DO;F%T:79E7VUI9&DN:%!+0(4!0````( M(Z!IBJ!W9XA] P.TQ```?``````````$`( "V at 4,$!N871I=F5?;6ED
M:2]N871I=F5?;6ED:5]W:6XS,BYC4$L!A0% ````@_(2F*@P#7FO!@M/@H```P``````````0`@`+:!=!$&UU<VEC+F,N9&EF9E!+!08`````! $ +``@!``!?% ``````
end

Of Florian ‘Proff’ Schulze

Hi,

I updated my patch to allow native midi support in SDL_mixer. It just kickes
in
when timidity can’t be initialized (cfg not find etc). It’s a diff to the
current CVS version, but only the source files are included. The makefiles
and
project workspaces need to be updated for it. Only music.c is changed, but
there
are two new files in the native_midi directory. The native midi is currently
only implemented for Windows, because I don’t have any knowledge about midi
on
other platforms.
This patch is used in PrBoom (prboom.sourceforge.net). The version attached
has
a bugfix for music looping which wasn’t released yet.


Oddly enough, I was thinking about why not include native midi support in
SDL somewhere a few days ago.

The new Winamp 2.71 and later has a new midi plugin that is zero-latency
(unlike the old midi plug-in which would have delays of up to 30 seconds
loading,) I’d like to see whatever was used in that plugin used for the
native windows midi system.

On the other hand, I personally think the largest pitfall about midi’s is
the fact that everyone’s computer plays them differently unless a common
soft-synth is used, defeating the purpose of hardware midi support.

(Any game ported from the console is a good example of this, FF7 and FF8
sound close to their PSX versions if only you use the Yamaha soft-synth, and
even then the samples supplied are pretty low quality. FF8 uses a DLS
soundbank, but the most popular sound cards(SB series) does not, and has
never supported them, contrary to various reviewers who obviously didn’t
even test the things. So FF8 uses the MS soft-synth instead of the
hardware.)


Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

----- Original Message -----
From: owner-sdl@lokigames.com [mailto:owner-sdl at lokigames.com]On Behalf
Sent: May 6, 2001 7:49 AM
To: sdl at lokigames.com
Subject: [SDL] Patch for SDL_mixer

Kick Arse! I know a number of people who are keen to see this happen
for the Linux platform too. If you’ve done all the hard work then it
should be relatively easy to rip relevant code out of playmidi.

Not that I’m volunteering… :-POn Sun, May 06, 2001 at 07:49:29AM -0700, Florian ‘Proff’ Schulze wrote:

Hi,

I updated my patch to allow native midi support in SDL_mixer. It just kickes in
when timidity can’t be initialized (cfg not find etc). It’s a diff to the
current CVS version, but only the source files are included. The makefiles and
project workspaces need to be updated for it. Only music.c is changed, but there
are two new files in the native_midi directory. The native midi is currently
only implemented for Windows, because I don’t have any knowledge about midi on
other platforms.