Bug 805254. Part 5: Remove format parameter from PAudio constructor. r=kinetik
authorRobert O'Callahan <robert@ocallahan.org>
Thu, 25 Oct 2012 23:09:39 +1300
changeset 111621 870743d33a56ba6b6a25ddccd79d509f5cceebd3
parent 111620 4edf6b315c50fc626223e5a7e526a48a8b00fc18
child 111622 da7b1a16814662dcb2a4182e6693089571e6bec1
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewerskinetik
bugs805254
milestone19.0a1
Bug 805254. Part 5: Remove format parameter from PAudio constructor. r=kinetik
content/media/nsAudioStream.cpp
dom/ipc/AudioParent.cpp
dom/ipc/AudioParent.h
dom/ipc/ContentChild.cpp
dom/ipc/ContentChild.h
dom/ipc/ContentParent.cpp
dom/ipc/ContentParent.h
dom/ipc/PContent.ipdl
--- a/content/media/nsAudioStream.cpp
+++ b/content/media/nsAudioStream.cpp
@@ -127,18 +127,17 @@ class AudioInitEvent : public nsRunnable
     mOwner = owner;
   }
 
   NS_IMETHOD Run()
   {
     ContentChild * cpc = ContentChild::GetSingleton();
     NS_ASSERTION(cpc, "Content Protocol is NULL!");
     mOwner->mAudioChild =  static_cast<AudioChild*>(cpc->SendPAudioConstructor(mOwner->mChannels,
-                                                                               mOwner->mRate,
-                                                                               Format()));
+                                                                               mOwner->mRate));
     return NS_OK;
   }
 
   nsRefPtr<nsRemotedAudioStream> mOwner;
 };
 
 class AudioWriteEvent : public nsRunnable
 {
--- a/dom/ipc/AudioParent.cpp
+++ b/dom/ipc/AudioParent.cpp
@@ -287,17 +287,17 @@ AudioParent::SendDrainDone()
 bool
 AudioParent::SendWriteDone()
 {
   if (mIPCOpen)
     return PAudioParent::SendWriteDone();
   return true;
 }
 
-AudioParent::AudioParent(int32_t aNumChannels, int32_t aRate, int32_t aFormat)
+AudioParent::AudioParent(int32_t aNumChannels, int32_t aRate)
   : mIPCOpen(true)
 {
   mStream = nsAudioStream::AllocateStream();
   NS_ASSERTION(mStream, "AudioStream allocation failed.");
   if (NS_FAILED(mStream->Init(aNumChannels, aRate))) {
       NS_WARNING("AudioStream initialization failed.");
       mStream = nullptr;
       return;
--- a/dom/ipc/AudioParent.h
+++ b/dom/ipc/AudioParent.h
@@ -45,17 +45,17 @@ class AudioParent : public PAudioParent,
     SendMinWriteSizeDone(int32_t minFrames);
 
     virtual bool
     SendDrainDone();
 
     virtual bool
     SendWriteDone();
 
-    AudioParent(int32_t aNumChannels, int32_t aRate, int32_t aFormat);
+    AudioParent(int32_t aNumChannels, int32_t aRate);
     virtual ~AudioParent();
     virtual void ActorDestroy(ActorDestroyReason);
 
     nsRefPtr<nsAudioStream> mStream;
     nsCOMPtr<nsITimer> mTimer;
 
 private:
     void Shutdown();
--- a/dom/ipc/ContentChild.cpp
+++ b/dom/ipc/ContentChild.cpp
@@ -650,18 +650,17 @@ bool
 ContentChild::RecvPTestShellConstructor(PTestShellChild* actor)
 {
     actor->SendPContextWrapperConstructor()->SendPObjectWrapperConstructor(true);
     return true;
 }
 
 PAudioChild*
 ContentChild::AllocPAudio(const int32_t& numChannels,
-                          const int32_t& rate,
-                          const int32_t& format)
+                          const int32_t& rate)
 {
 #if defined(MOZ_SYDNEYAUDIO)
     AudioChild *child = new AudioChild();
     NS_ADDREF(child);
     return child;
 #else
     return nullptr;
 #endif
--- a/dom/ipc/ContentChild.h
+++ b/dom/ipc/ContentChild.h
@@ -118,17 +118,16 @@ public:
     RecvDumpGCAndCCLogsToFile(const nsString& aIdentifier,
                               const bool& aDumpChildProcesses);
 
     virtual PTestShellChild* AllocPTestShell();
     virtual bool DeallocPTestShell(PTestShellChild*);
     virtual bool RecvPTestShellConstructor(PTestShellChild*);
 
     virtual PAudioChild* AllocPAudio(const int32_t&,
-                                     const int32_t&,
                                      const int32_t&);
     virtual bool DeallocPAudio(PAudioChild*);
 
     virtual PNeckoChild* AllocPNecko();
     virtual bool DeallocPNecko(PNeckoChild*);
 
     virtual PExternalHelperAppChild *AllocPExternalHelperApp(
             const OptionalURIParams& uri,
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -1433,21 +1433,20 @@ bool
 ContentParent::DeallocPTestShell(PTestShellParent* shell)
 {
   delete shell;
   return true;
 }
  
 PAudioParent*
 ContentParent::AllocPAudio(const int32_t& numChannels,
-                           const int32_t& rate,
-                           const int32_t& format)
+                           const int32_t& rate)
 {
 #if defined(MOZ_SYDNEYAUDIO)
-    AudioParent *parent = new AudioParent(numChannels, rate, format);
+    AudioParent *parent = new AudioParent(numChannels, rate);
     NS_ADDREF(parent);
     return parent;
 #else
     return nullptr;
 #endif
 }
 
 bool
--- a/dom/ipc/ContentParent.h
+++ b/dom/ipc/ContentParent.h
@@ -217,17 +217,16 @@ private:
 
     virtual PMemoryReportRequestParent* AllocPMemoryReportRequest();
     virtual bool DeallocPMemoryReportRequest(PMemoryReportRequestParent* actor);
 
     virtual PTestShellParent* AllocPTestShell();
     virtual bool DeallocPTestShell(PTestShellParent* shell);
 
     virtual PAudioParent* AllocPAudio(const int32_t&,
-                                     const int32_t&,
                                      const int32_t&);
     virtual bool DeallocPAudio(PAudioParent*);
 
     virtual PNeckoParent* AllocPNecko();
     virtual bool DeallocPNecko(PNeckoParent* necko);
 
     virtual PExternalHelperAppParent* AllocPExternalHelperApp(
             const OptionalURIParams& aUri,
--- a/dom/ipc/PContent.ipdl
+++ b/dom/ipc/PContent.ipdl
@@ -267,17 +267,17 @@ parent:
      * isForBrowser|, we're loading <browser> for an app.  When
      * |isForBrowser|, we're loading <browser>.  When |!isForApp &&
      * !isForBrowser|, we're probably loading <xul:browser remote>.
      */
     sync GetProcessAttributes()
         returns (uint64_t id, bool startBackground,
                  bool isForApp, bool isForBrowser);
 
-    PAudio(int32_t aNumChannels, int32_t aRate, int32_t aFormat);
+    PAudio(int32_t aNumChannels, int32_t aRate);
 
     PDeviceStorageRequest(DeviceStorageParams params);
 
     sync PCrashReporter(NativeThreadId tid, uint32_t processType);
 
     PHal();
 
     PIndexedDB();