Free Hero Mesh

Check-in [debe888931]
Login
This is a mirror of the main repository for Free Hero Mesh. New tickets and changes will not be accepted at this mirror.
Overview
Comment:Some more additions to sound.c
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: debe8889312f1d0e7ffc3f19f325ef1d9a58a3a1
User & Date: user on 2021-04-07 21:59:42
Other Links: manifest | tags
Context
2021-04-07
22:05
Allow displaying help and level strings in the examine object menu. check-in: dc43d63bc6 user: user tags: trunk
21:59
Some more additions to sound.c check-in: debe888931 user: user tags: trunk
2021-04-06
21:21
Implement more of the deferred movement (untested so far, although it does compile). check-in: 6bc4ddf9d6 user: user tags: trunk
Changes

Modified sound.c from [588b432299] to [e89c4e6e03].

32
33
34
35
36
37
38

39
40
41
42
43
44
45
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46







+








static Uint8*volatile wavesound;
static volatile Uint32 wavelen;

static void audio_callback(void*userdata,Uint8*stream,int len) {
  if(wavesound) {
    if(wavelen<len) {
      memcpy(stream,wavesound,wavelen);
      memset(stream+wavelen,0,len-wavelen);
      wavesound=0;
      wavelen=0;
    } else {
      memcpy(stream,wavesound,len);
      wavesound+=len;
      len-=len;
137
138
139
140
141
142
143


144
145
146
147
148
149
150
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153







+
+







    return;
  }
  optionquery[2]=Q_waveVolume;
  if(v=xrm_get_resource(resourcedb,optionquery,optionquery,3)) {
    needs_amplify=1;
    wavevolume=strtod(v,0);
  }
  optionquery[2]=Q_mmlVolume;
  if(v=xrm_get_resource(resourcedb,optionquery,optionquery,3)) mmlvolume=fmin(strtod(v,0)*32767.0,32767.0);
  
  fprintf(stderr,"Done.\n");
  wavesound=0;
  SDL_PauseAudio(0);
  sound_on=1;
}