~ubuntu-branches/ubuntu/gutsy/blender/gutsy-security

« back to all changes in this revision

Viewing changes to source/blender/src/seqaudio.c

  • Committer: Bazaar Package Importer
  • Author(s): Florian Ernst
  • Date: 2005-11-06 12:40:03 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051106124003-3pgs7tcg5rox96xg
Tags: 2.37a-1.1
* Non-maintainer upload.
* Split out parts of 01_SConstruct_debian.dpatch again: root_build_dir
  really needs to get adjusted before the clean target runs - closes: #333958,
  see #288882 for reference

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
#include <unistd.h>
37
37
#else
38
38
#include <io.h>
39
 
#include "BLI_winstuff.h"
40
39
#endif   
41
40
 
42
41
#include <fcntl.h>
79
78
 
80
79
#include "BSE_view.h"
81
80
#include "BSE_seqaudio.h"
 
81
#include "BIF_editsound.h"
82
82
 
83
83
#include "mydevice.h"
84
84
#include "blendef.h"
85
 
#include "render.h"
 
85
#include "render.h"     // RE_make_existing_file()
86
86
 
87
87
 
88
88
void audio_fill(void *mixdown, Uint8 *sstream, int len);
94
94
int audio_playing=0;
95
95
/////
96
96
//
97
 
 
98
 
 
99
 
void makewavstring (char *string) 
 
97
/* local protos ------------------- */
 
98
void audio_mixdown(void);
 
99
 
 
100
static void makewavstring (char *string) 
100
101
{
101
102
        char txt[64];
102
103
 
107
108
 
108
109
        RE_make_existing_file(string);
109
110
 
110
 
        if (strcasecmp(string + strlen(string) - 4, ".wav")) {
 
111
        if (BLI_strcasecmp(string + strlen(string) - 4, ".wav")) {
111
112
                sprintf(txt, "%04d_%04d.wav", (G.scene->r.sfra) , (G.scene->r.efra) );
112
113
                strcat(string, txt);
113
114
        }
127
128
 
128
129
        if(file == -1) 
129
130
        {
130
 
                error("Cannot open output file!");
 
131
                error("Can't open output file");
131
132
                return;
132
133
        }
133
134
 
199
200
        return;
200
201
}
201
202
 
202
 
void audio_levels(Uint8 *buf, int len, float db, float facf, float pan)
 
203
static void audio_levels(Uint8 *buf, int len, float db, float facf, float pan)
203
204
{
204
205
        int i;
205
206
        float facl, facr, fac;
311
312
    }
312
313
}    
313
314
 
314
 
int audio_init(SDL_AudioSpec *desired)
 
315
static int audio_init(SDL_AudioSpec *desired)
315
316
{
316
317
        SDL_AudioSpec *obtained, *hardware_spec;
317
318
 
323
324
 
324
325
        if ( SDL_OpenAudio(desired, obtained) < 0 ){
325
326
          fprintf(stderr, "Couldn't open audio: %s\n", SDL_GetError());
 
327
          if (obtained) MEM_freeN(obtained);
326
328
          return 0;
327
329
        }
328
330
        hardware_spec=obtained;