ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/Client.xs
(Generate patch)

Comparing deliantra/Deliantra-Client/Client.xs (file contents):
Revision 1.301 by root, Thu Feb 4 20:01:08 2010 UTC vs.
Revision 1.303 by root, Thu Apr 22 11:18:04 2010 UTC

1027 1027
1028 XPUSHs (sv_2mortal (sv_bless (newRV_noinc ((SV *)hv), gv_stashpv ("DC::UI::Event", 1)))); 1028 XPUSHs (sv_2mortal (sv_bless (newRV_noinc ((SV *)hv), gv_stashpv ("DC::UI::Event", 1))));
1029 } 1029 }
1030} 1030}
1031 1031
1032char *
1033SDL_AudioDriverName ()
1034 CODE:
1035{
1036 char buf [256];
1037 if (!SDL_AudioDriverName (buf, sizeof (buf)))
1038 XSRETURN_UNDEF;
1039
1040 RETVAL = buf;
1041}
1042 OUTPUT:
1043 RETVAL
1044
1032int 1045int
1033Mix_OpenAudio (int frequency = 44100, int format = MIX_DEFAULT_FORMAT, int channels = 2, int chunksize = 4096) 1046Mix_OpenAudio (int frequency = 44100, int format = MIX_DEFAULT_FORMAT, int channels = 2, int chunksize = 4096)
1034 POSTCALL: 1047 POSTCALL:
1035 Mix_HookMusicFinished (music_finished); 1048 Mix_HookMusicFinished (music_finished);
1036 Mix_ChannelFinished (channel_finished); 1049 Mix_ChannelFinished (channel_finished);
2798 if (RETVAL < 0) 2811 if (RETVAL < 0)
2799 { 2812 {
2800 RETVAL = Mix_GroupOldest (-1); 2813 RETVAL = Mix_GroupOldest (-1);
2801 2814
2802 if (RETVAL < 0) 2815 if (RETVAL < 0)
2816 {
2817 // happens sometimes, maybe it just stopped playing(?)
2818 RETVAL = Mix_GroupAvailable (-1);
2819
2820 if (RETVAL < 0)
2803 XSRETURN_UNDEF; 2821 XSRETURN_UNDEF;
2804 2822 }
2823 else
2805 Mix_HaltChannel (RETVAL); 2824 Mix_HaltChannel (RETVAL);
2806 } 2825 }
2807 2826
2808 Mix_UnregisterAllEffects (RETVAL); 2827 Mix_UnregisterAllEffects (RETVAL);
2809 Mix_Volume (RETVAL, 128); 2828 Mix_Volume (RETVAL, 128);
2810} 2829}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines