.hgignore
author Sam Lantinga
Sat, 08 Jun 2019 18:22:18 -0700
changeset 12803 70d338e248c8
parent 12130 24142c5073a4
child 12990 b7e03b88e36b
permissions -rw-r--r--
Fixed bug 4294 - Audio: perform more validation on conversion request

janisozaur

There are many cases which are not able to be handled by SDL's audio conversion routines, including too low (negative) rate, too high rate (impossible to allocate).

This patch aims to report such issues early and handle others in a graceful manner. The "INT32_MAX / RESAMPLER_SAMPLES_PER_ZERO_CROSSING" value is the conservative approach in terms of what can _technically_ be supported, but its value is 4'194'303, or just shy of 4.2MHz. I highly doubt any sane person would use such rates, especially in SDL2, so I would like to drive this limit further down, but would need some assistance to do that, as doing so would have to introduce an arbitrary value. Are you OK with such approach? What would a good value be? Wikipedia (https://en.wikipedia.org/wiki/High-resolution_audio) lists 96kHz as the highest sampling rate in use, even if I quadruple it for a good measure, to 384kHz it's still an order of magnitude lower than 4MHz.
     1 syntax:glob
     2 aclocal.m4
     3 autom4te*
     4 config.cache
     5 config.log
     6 config.status
     7 Makefile
     8 sdl-config
     9 SDL2.spec
    10 build
    11 gen
    12 Build
    13 
    14 # for Xcode
    15 *.orig
    16 *.swp
    17 *.tmp
    18 *.rej
    19 *~
    20 *.o
    21 *.mode1*
    22 *.perspective*
    23 *.pbxuser
    24 (^|/)build($|/)
    25 .DS_Store
    26 xcuserdata
    27 *.xcworkspace
    28 
    29 # for Visual C++
    30 Debug
    31 Release
    32 *.user
    33 *.ncb
    34 *.suo
    35 *.sdf
    36 VisualC/tests/loopwave/sample.wav
    37 VisualC/tests/testautomation/CompareSurfaces0001_Reference.bmp
    38 VisualC/tests/testautomation/CompareSurfaces0001_TestOutput.bmp
    39 VisualC/tests/testgamecontroller/axis.bmp
    40 VisualC/tests/testgamecontroller/button.bmp
    41 VisualC/tests/testgamecontroller/controllermap.bmp
    42 VisualC/tests/testoverlay2/moose.dat
    43 VisualC/tests/testrendertarget/icon.bmp
    44 VisualC/tests/testrendertarget/sample.bmp
    45 VisualC/tests/testscale/icon.bmp
    46 VisualC/tests/testscale/sample.bmp
    47 VisualC/tests/testsprite2/icon.bmp
    48 VisualC/visualtest/icon.bmp
    49 VisualC/visualtest/testquit.actions
    50 VisualC/visualtest/testquit.config
    51 VisualC/visualtest/testquit.exe
    52 VisualC/visualtest/testquit.parameters
    53 VisualC/visualtest/testsprite2.exe
    54 VisualC/visualtest/testsprite2_sample.actions
    55 VisualC/visualtest/testsprite2_sample.config
    56 VisualC/visualtest/testsprite2_sample.parameters
    57 
    58 # for Android
    59 android-project/local.properties
    60 
    61 sdl.pc
    62 test/autom4te*
    63 test/config.cache
    64 test/config.log
    65 test/config.status
    66 test/Makefile
    67 test/SDL2.dll
    68 test/checkkeys
    69 test/controllermap
    70 test/loopwave
    71 test/loopwavequeue
    72 test/testatomic
    73 test/testaudiocapture
    74 test/testaudiohotplug
    75 test/testaudioinfo
    76 test/testautomation
    77 test/testbounds
    78 test/testcustomcursor
    79 test/testdisplayinfo
    80 test/testdraw2
    81 test/testdrawchessboard
    82 test/testdropfile
    83 test/testerror
    84 test/testfile
    85 test/testfilesystem
    86 test/testgamecontroller
    87 test/testgesture
    88 test/testgl2
    89 test/testgles
    90 test/testgles2
    91 test/testhaptic
    92 test/testhittesting
    93 test/testhotplug
    94 test/testiconv
    95 test/testime
    96 test/testintersections
    97 test/testjoystick
    98 test/testkeys
    99 test/testloadso
   100 test/testlock
   101 test/testmessage
   102 test/testmultiaudio
   103 test/testnative
   104 test/testoverlay2
   105 test/testplatform
   106 test/testpower
   107 test/testqsort
   108 test/testrelative
   109 test/testrendercopyex
   110 test/testrendertarget
   111 test/testresample
   112 test/testrumble
   113 test/testscale
   114 test/testsem
   115 test/testsensor
   116 test/testshader
   117 test/testshape
   118 test/testsprite2
   119 test/testspriteminimal
   120 test/teststreaming
   121 test/testthread
   122 test/testtimer
   123 test/testver
   124 test/testviewport
   125 test/testwm2
   126 test/testyuv
   127 test/torturethread
   128 test/*.exe
   129 test/*.dSYM
   130 buildbot
   131 test/buildbot