~ubuntu-branches/ubuntu/lucid/blender/lucid

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Chris Coulson
  • Date: 2009-08-06 22:32:19 UTC
  • mfrom: (1.2.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20090806223219-8z4eej1u8levu4pz
Tags: 2.49a+dfsg-0ubuntu1
* Merge from debian unstable, remaining changes:
  - debian/control: Build-depend on python-2.6 rather than python-2.5.
  - debian/misc/*.desktop: Add Spanish translation to .desktop 
    files.
  - debian/pyversions: 2.6.
  - debian/rules: Clean *.o of source/blender/python/api2_2x/
* New upstream release (LP: #382153).
* Refreshed patches:
  - 01_sanitize_sys.patch
  - 02_tmp_in_HOME
  - 10_use_systemwide_ftgl
  - 70_portability_platform_detection
* Removed patches merged upstream:
  - 30_fix_python_syntax_warning
  - 90_ubuntu_ffmpeg_52_changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/**
2
 
 * $Id: editsound.c 16934 2008-10-05 12:06:55Z aligorith $
 
2
 * $Id: editsound.c 19395 2009-03-24 09:09:10Z campbellbarton $
3
3
 *
4
4
 * ***** BEGIN GPL LICENSE BLOCK *****
5
5
 *
530
530
                        filetype = SAMPLE_WAV;
531
531
                }
532
532
                else
533
 
                        /* only fmod supports compressed wav */
534
 
#ifdef USE_FMOD
535
533
                {
536
 
                        /* and only valid publishers may use compressed wav */
537
 
                        switch (shortbuf)
538
 
                        {
539
 
                        case SND_WAVE_FORMAT_ADPCM:
540
 
                        case SND_WAVE_FORMAT_ALAW:
541
 
                        case SND_WAVE_FORMAT_MULAW:
542
 
                        case SND_WAVE_FORMAT_DIALOGIC_OKI_ADPCM:
543
 
                        case SND_WAVE_FORMAT_CONTROL_RES_VQLPC:
544
 
                        case SND_WAVE_FORMAT_GSM_610:
545
 
                        case SND_WAVE_FORMAT_MPEG3:
546
 
                                filetype = SAMPLE_WAV;
547
 
                                break;
548
 
                        default:
549
 
#endif
550
 
                                {
551
 
                                        filetype = SAMPLE_INVALID;
552
 
                                        if (G.f & G_DEBUG) printf("Unsupported wav compression\n");
553
 
                                }
554
 
                        }
555
 
#ifdef USE_FMOD
 
534
                        filetype = SAMPLE_INVALID;
 
535
                        if (G.f & G_DEBUG) printf("Unsupported wav compression\n");
556
536
                }
557
537
        }
558
 
        else if (!memcmp(buffer, "OggS", 4)) {
559
 
                filetype = SAMPLE_OGG_VORBIS;
560
 
        }
561
 
        else if ((!memcmp(buffer, "ID3", 3)) || (!memcmp(buffer, "", 2))) {
562
 
                filetype = SAMPLE_MP3;
563
 
        }
564
 
#endif
565
538
        else {
566
539
                filetype = SAMPLE_INVALID;
567
540
                if (G.f & G_DEBUG) printf("Unsupported sound format: %s\n", sound->name);
583
556
        // a simple check to see what kind of sample we're dealing with
584
557
        if (stricmp(pdest, ".wav") == 0)
585
558
                sound->sample->type = SAMPLE_WAV;
586
 
 
587
 
#ifdef USE_FMOD
588
 
        if (stricmp(pdest, ".mp2") == 0)
589
 
                sound->sample->type = SAMPLE_MP2;
590
 
        if (stricmp(pdest, ".mp3") == 0)
591
 
                sound->sample->type = SAMPLE_MP3;
592
 
        if (stricmp(pdest, ".ogg") == 0)
593
 
                sound->sample->type = SAMPLE_OGG_VORBIS;
594
 
        if (stricmp(pdest, ".raw") == 0)
595
 
                sound->sample->type = SAMPLE_RAW;
596
 
        if (stricmp(pdest, ".wma") == 0)
597
 
                sound->sample->type = SAMPLE_WMA;
598
 
        if (stricmp(pdest, ".asf") == 0)
599
 
                sound->sample->type = SAMPLE_ASF;
600
 
#endif
601
559
*/
602
560
        sound->sample->type = sound_get_filetype_from_header(sound, pf);
603
561
 
1061
1019
}
1062
1020
 
1063
1021
 
1064
 
int sound_get_mixrate(void)
1065
 
{
1066
 
        return MIXRATE;
1067
 
}
1068
 
 
1069
 
 
1070
1022
void sound_exit_audio(void)
1071
1023
{
1072
1024
        if(ghSoundScene) {