Commit Graph

16 Commits

Author SHA1 Message Date
Karl Tomlinson
6f77a7975e b=865241 don't join HRTFDatabaseLoader thread until it has finished r=ehsan
Also turn some always-true conditions into assertions.

--HG--
extra : rebase_source : a38b75a1a27f25cef7b9dd86a1cca15ce9f67893
2013-08-09 10:07:42 +12:00
Ehsan Akhgari
085494b95d Bug 895322 - Part 1: Replace the usages of MOZ_STATIC_ASSERT with C++11 static_assert; r=Waldo
This patch was mostly generated by running the following scripts on the codebase, with some
manual changes made afterwards:

# static_assert.sh
#!/bin/bash
# Command to convert an NSPR integer type to the equivalent standard integer type

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*/.hg*" \
       ! -wholename "obj-ff-dbg*" \
       ! -name nsXPCOMCID.h \
       ! -name prtypes.h \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.cc" \
         -o -iname "*.mm" \) | \
    xargs -n 1 `dirname $0`/assert_replacer.py #sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_STATIC_ASSERT static_assert
hg rev --no-backup mfbt/Assertions.h \
                   media/webrtc/signaling/src/sipcc/core/includes/ccapi.h \
                   modules/libmar/src/mar_private.h \
                   modules/libmar/src/mar.h


# assert_replacer.py
#!/usr/bin/python

import sys
import re

pattern = re.compile(r"\bMOZ_STATIC_ASSERT\b")

def replaceInPlace(fname):
  print fname
  f = open(fname, "rw+")
  lines = f.readlines()
  for i in range(0, len(lines)):
    while True:
      index = re.search(pattern, lines[i])
      if index != None:
        index = index.start()
        lines[i] = lines[i][0:index] + "static_assert" + lines[i][index+len("MOZ_STATIC_ASSERT"):]
        for j in range(i + 1, len(lines)):
          if lines[j].find("                 ", index) == index:
            lines[j] = lines[j][0:index] + lines[j][index+4:]
          else:
            break
      else:
        break
  f.seek(0, 0)
  f.truncate()
  f.write("".join(lines))
  f.close()

argc = len(sys.argv)
for i in range(1, argc):
  replaceInPlace(sys.argv[i])

--HG--
extra : rebase_source : 4b4a4047d82f2c205b9fad8d56dfc3f1afc0b045
2013-07-18 13:59:53 -04:00
Ehsan Akhgari
76553f250a Bug 876024 - Sanity check all of the time values passed to Web Audio; r=roc 2013-05-30 20:53:15 -04:00
Ehsan Akhgari
ff03101c76 Bug 877039 - Set the Web Audio maximum channel count to 32; r=roc
--HG--
extra : rebase_source : 7e5bb51cd3bd9b4fbe01649af8f14e17cf6b3042
2013-05-30 14:25:52 -04:00
Ehsan Akhgari
fe9a997fa6 Bug 876118 - Impose a unified channel count limit of 10000 channels in Web Audio; r=roc
--HG--
extra : rebase_source : 480cebb99e5dd8673df179b490d11e6c513fa1d1
2013-05-29 07:36:37 -04:00
Ehsan Akhgari
c74b3d338f Bug 873553 - Part 9: Port WebAudioUtils to use the stream's sampling rate; r=roc
--HG--
extra : rebase_source : 18e01ed739bb505f7825c3d79e00c8552a70fad0
2013-05-24 13:11:18 -04:00
Nathan Froyd
dbba9baf39 Bug 858131 - rewrite FloatingPoint.h to be C++-only instead of C-compatible C++; r+original-author=Waldo 2013-05-01 16:55:13 -04:00
Ehsan Akhgari
65d65fc57c Bug 869224 - Use the same algorithm to compute the buffer start/end time and to convert AudioParam time values to ticks; r=roc 2013-05-07 23:31:15 -04:00
Ehsan Akhgari
fefedbf170 Bug 867174 - Part 2: Protect against invalid sample rates a bit harder; r=padenot 2013-05-06 11:34:03 -04:00
Ehsan Akhgari
f03533b4a7 Bug 864091 - Part 2: Add the Blink Dynamics Compressor implementation to the build system; r=padenot,glandium 2013-04-20 23:12:00 -04:00
Ehsan Akhgari
51c4aebe76 Bug 834513 - Part 3: Implement ScriptProcessorNode; r=roc 2013-04-13 21:37:04 -04:00
Paul Adenot
4acb2a4b45 Bug 853551 - Implement the doppler part of AudioPannerNode. r=ehsan 2013-04-11 14:47:57 +02:00
Ehsan Akhgari
730bf8e981 Bug 853721 - Part 2: Hook up DelayNode to the media streams graph and implement delaying of incoming audio; r=roc 2013-03-25 08:34:59 -04:00
Ehsan Akhgari
037a61128d Bug 855990 - Part 5: Implement the analysis routines of AnalyserNode; r=padenot
--HG--
extra : rebase_source : dc459a731d5793c169f73271f2d2043d472288e4
2013-04-01 19:26:17 -04:00
Ehsan Akhgari
9214399971 Bug 853721 - Part 1: Refactor the code to convert GainNode's AudioParamTimeline to ticks into WebAudioUtils; r=roc 2013-03-22 00:01:28 -04:00
Ehsan Akhgari
f96749709d Bug 853246 - Optimize Panner and Listener methods when processing them would not have a significant effect; r=roc 2013-03-20 20:12:07 -04:00