30 Commits

Author SHA1 Message Date
henrika
3d7346fd46 Adds delta-time logging for audio playout
BUG=NONE
R=magjed@webrtc.org

Review URL: https://codereview.webrtc.org/2190343002 .

Cr-Commit-Position: refs/heads/master@{#13576}
2016-07-29 14:21:41 +00:00
henrika
6c4d0f0bbf Reland of Adds data logging in native AudioDeviceBuffer class (patchset #1 id:1 of https://codereview.webrtc.org/2148623004/ )
Reason for revert:
New fixes in libevent indicates that we are OK and can reland again.

Original issue's description:
> Revert of Adds data logging in native AudioDeviceBuffer class (patchset #1 id:1 of https://codereview.webrtc.org/2146853003/ )
>
> Reason for revert:
> Looks like things are still breaking upstream... :(
>
> Original issue's description:
> > Reland of Adds data logging in native AudioDeviceBuffer class (patchset #1 id:1 of https://codereview.webrtc.org/2141413002/ )
> >
> > Reason for revert:
> > Will make one more try since we have now confirmed that our TaskQueue tests works on Android. Let's hope for the best...
> >
> > Original issue's description:
> > > Revert of Adds data logging in native AudioDeviceBuffer class (patchset #1 id:1 of https://codereview.webrtc.org/2138403003/ )
> > >
> > > Reason for revert:
> > > Reverting again since it might have caused this issue:
> > >
> > > https://build.chromium.org/p/chromium.webrtc.fyi/builders/Android%20Tests%20%28dbg%29%20%28L%20Nexus9%29/builds/13622/steps/content_browsertests/logs/stdio
> > >
> > > Original issue's description:
> > > > Reland of Adds data logging in native AudioDeviceBuffer class (patchset #1 id:1 of https://codereview.webrtc.org/2139233002/ )
> > > >
> > > > Reason for revert:
> > > > My original patch broke things that are now fixed by https://codereview.webrtc.org/2141193002/.
> > > >
> > > > Hence I am relanding my original change.
> > > >
> > > > Original issue's description:
> > > > > Revert of Adds data logging in native AudioDeviceBuffer class (patchset #10 id:180001 of https://codereview.webrtc.org/2132613002/ )
> > > > >
> > > > > Reason for revert:
> > > > > Seems to break things upstream.
> > > > >
> > > > > Original issue's description:
> > > > > > Adds data logging in native AudioDeviceBuffer class.
> > > > > >
> > > > > > Goal is to provide periodic logging of most essential audio parameters
> > > > > > for playout and recording sides. It will allow us to track if the native audio layer is working as intended.
> > > > > >
> > > > > > BUG=NONE
> > > > > >
> > > > > > Committed: https://crrev.com/348e411dd27e6dbe9b84b27ce46e9b7c657c1eae
> > > > > > Cr-Commit-Position: refs/heads/master@{#13440}
> > > > >
> > > > > TBR=stefan@webrtc.org,henrika@webrtc.org
> > > > > # Skipping CQ checks because original CL landed less than 1 days ago.
> > > > > NOPRESUBMIT=true
> > > > > NOTREECHECKS=true
> > > > > NOTRY=true
> > > > > BUG=NONE
> > > > >
> > > > > Committed: https://crrev.com/025aa94ccb85e4c6fe20a3fecdac5d27ec9ba3da
> > > > > Cr-Commit-Position: refs/heads/master@{#13441}
> > > >
> > > > TBR=stefan@webrtc.org,sprang@webrtc.org
> > > > # Skipping CQ checks because original CL landed less than 1 days ago.
> > > > NOPRESUBMIT=true
> > > > NOTREECHECKS=true
> > > > NOTRY=true
> > > > BUG=NONE
> > > >
> > > > Committed: https://crrev.com/dd2fdecc78c50377d10ec98b41179acde9218ee7
> > > > Cr-Commit-Position: refs/heads/master@{#13455}
> > >
> > > TBR=stefan@webrtc.org,sprang@webrtc.org
> > > # Skipping CQ checks because original CL landed less than 1 days ago.
> > > NOPRESUBMIT=true
> > > NOTREECHECKS=true
> > > NOTRY=true
> > > BUG=NONE
> > >
> > > Committed: https://crrev.com/5dd941e5a5ccde541d9b40a1df379ed59c5fab5c
> > > Cr-Commit-Position: refs/heads/master@{#13457}
> >
> > TBR=stefan@webrtc.org,sprang@webrtc.org
> > # Skipping CQ checks because original CL landed less than 1 days ago.
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=NONE
> >
> > Committed: https://crrev.com/b201da3fab5efc048a4341f39293d2dcf27b2eec
> > Cr-Commit-Position: refs/heads/master@{#13462}
>
> TBR=stefan@webrtc.org,henrika@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=NONE
>
> Committed: https://crrev.com/ac09501381575dcb07560effc45ec7263d3ff3ad
> Cr-Commit-Position: refs/heads/master@{#13464}

TBR=stefan@webrtc.org,sprang@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=NONE

Review-Url: https://codereview.webrtc.org/2148243002
Cr-Commit-Position: refs/heads/master@{#13476}
2016-07-14 12:54:24 +00:00
sprang
ac09501381 Revert of Adds data logging in native AudioDeviceBuffer class (patchset #1 id:1 of https://codereview.webrtc.org/2146853003/ )
Reason for revert:
Looks like things are still breaking upstream... :(

Original issue's description:
> Reland of Adds data logging in native AudioDeviceBuffer class (patchset #1 id:1 of https://codereview.webrtc.org/2141413002/ )
>
> Reason for revert:
> Will make one more try since we have now confirmed that our TaskQueue tests works on Android. Let's hope for the best...
>
> Original issue's description:
> > Revert of Adds data logging in native AudioDeviceBuffer class (patchset #1 id:1 of https://codereview.webrtc.org/2138403003/ )
> >
> > Reason for revert:
> > Reverting again since it might have caused this issue:
> >
> > https://build.chromium.org/p/chromium.webrtc.fyi/builders/Android%20Tests%20%28dbg%29%20%28L%20Nexus9%29/builds/13622/steps/content_browsertests/logs/stdio
> >
> > Original issue's description:
> > > Reland of Adds data logging in native AudioDeviceBuffer class (patchset #1 id:1 of https://codereview.webrtc.org/2139233002/ )
> > >
> > > Reason for revert:
> > > My original patch broke things that are now fixed by https://codereview.webrtc.org/2141193002/.
> > >
> > > Hence I am relanding my original change.
> > >
> > > Original issue's description:
> > > > Revert of Adds data logging in native AudioDeviceBuffer class (patchset #10 id:180001 of https://codereview.webrtc.org/2132613002/ )
> > > >
> > > > Reason for revert:
> > > > Seems to break things upstream.
> > > >
> > > > Original issue's description:
> > > > > Adds data logging in native AudioDeviceBuffer class.
> > > > >
> > > > > Goal is to provide periodic logging of most essential audio parameters
> > > > > for playout and recording sides. It will allow us to track if the native audio layer is working as intended.
> > > > >
> > > > > BUG=NONE
> > > > >
> > > > > Committed: https://crrev.com/348e411dd27e6dbe9b84b27ce46e9b7c657c1eae
> > > > > Cr-Commit-Position: refs/heads/master@{#13440}
> > > >
> > > > TBR=stefan@webrtc.org,henrika@webrtc.org
> > > > # Skipping CQ checks because original CL landed less than 1 days ago.
> > > > NOPRESUBMIT=true
> > > > NOTREECHECKS=true
> > > > NOTRY=true
> > > > BUG=NONE
> > > >
> > > > Committed: https://crrev.com/025aa94ccb85e4c6fe20a3fecdac5d27ec9ba3da
> > > > Cr-Commit-Position: refs/heads/master@{#13441}
> > >
> > > TBR=stefan@webrtc.org,sprang@webrtc.org
> > > # Skipping CQ checks because original CL landed less than 1 days ago.
> > > NOPRESUBMIT=true
> > > NOTREECHECKS=true
> > > NOTRY=true
> > > BUG=NONE
> > >
> > > Committed: https://crrev.com/dd2fdecc78c50377d10ec98b41179acde9218ee7
> > > Cr-Commit-Position: refs/heads/master@{#13455}
> >
> > TBR=stefan@webrtc.org,sprang@webrtc.org
> > # Skipping CQ checks because original CL landed less than 1 days ago.
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=NONE
> >
> > Committed: https://crrev.com/5dd941e5a5ccde541d9b40a1df379ed59c5fab5c
> > Cr-Commit-Position: refs/heads/master@{#13457}
>
> TBR=stefan@webrtc.org,sprang@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=NONE
>
> Committed: https://crrev.com/b201da3fab5efc048a4341f39293d2dcf27b2eec
> Cr-Commit-Position: refs/heads/master@{#13462}

TBR=stefan@webrtc.org,henrika@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=NONE

Review-Url: https://codereview.webrtc.org/2148623004
Cr-Commit-Position: refs/heads/master@{#13464}
2016-07-13 14:55:52 +00:00
henrika
b201da3fab Reland of Adds data logging in native AudioDeviceBuffer class (patchset #1 id:1 of https://codereview.webrtc.org/2141413002/ )
Reason for revert:
Will make one more try since we have now confirmed that our TaskQueue tests works on Android. Let's hope for the best...

Original issue's description:
> Revert of Adds data logging in native AudioDeviceBuffer class (patchset #1 id:1 of https://codereview.webrtc.org/2138403003/ )
>
> Reason for revert:
> Reverting again since it might have caused this issue:
>
> https://build.chromium.org/p/chromium.webrtc.fyi/builders/Android%20Tests%20%28dbg%29%20%28L%20Nexus9%29/builds/13622/steps/content_browsertests/logs/stdio
>
> Original issue's description:
> > Reland of Adds data logging in native AudioDeviceBuffer class (patchset #1 id:1 of https://codereview.webrtc.org/2139233002/ )
> >
> > Reason for revert:
> > My original patch broke things that are now fixed by https://codereview.webrtc.org/2141193002/.
> >
> > Hence I am relanding my original change.
> >
> > Original issue's description:
> > > Revert of Adds data logging in native AudioDeviceBuffer class (patchset #10 id:180001 of https://codereview.webrtc.org/2132613002/ )
> > >
> > > Reason for revert:
> > > Seems to break things upstream.
> > >
> > > Original issue's description:
> > > > Adds data logging in native AudioDeviceBuffer class.
> > > >
> > > > Goal is to provide periodic logging of most essential audio parameters
> > > > for playout and recording sides. It will allow us to track if the native audio layer is working as intended.
> > > >
> > > > BUG=NONE
> > > >
> > > > Committed: https://crrev.com/348e411dd27e6dbe9b84b27ce46e9b7c657c1eae
> > > > Cr-Commit-Position: refs/heads/master@{#13440}
> > >
> > > TBR=stefan@webrtc.org,henrika@webrtc.org
> > > # Skipping CQ checks because original CL landed less than 1 days ago.
> > > NOPRESUBMIT=true
> > > NOTREECHECKS=true
> > > NOTRY=true
> > > BUG=NONE
> > >
> > > Committed: https://crrev.com/025aa94ccb85e4c6fe20a3fecdac5d27ec9ba3da
> > > Cr-Commit-Position: refs/heads/master@{#13441}
> >
> > TBR=stefan@webrtc.org,sprang@webrtc.org
> > # Skipping CQ checks because original CL landed less than 1 days ago.
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=NONE
> >
> > Committed: https://crrev.com/dd2fdecc78c50377d10ec98b41179acde9218ee7
> > Cr-Commit-Position: refs/heads/master@{#13455}
>
> TBR=stefan@webrtc.org,sprang@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=NONE
>
> Committed: https://crrev.com/5dd941e5a5ccde541d9b40a1df379ed59c5fab5c
> Cr-Commit-Position: refs/heads/master@{#13457}

TBR=stefan@webrtc.org,sprang@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=NONE

Review-Url: https://codereview.webrtc.org/2146853003
Cr-Commit-Position: refs/heads/master@{#13462}
2016-07-13 13:40:25 +00:00
henrika
5dd941e5a5 Revert of Adds data logging in native AudioDeviceBuffer class (patchset #1 id:1 of https://codereview.webrtc.org/2138403003/ )
Reason for revert:
Reverting again since it might have caused this issue:

https://build.chromium.org/p/chromium.webrtc.fyi/builders/Android%20Tests%20%28dbg%29%20%28L%20Nexus9%29/builds/13622/steps/content_browsertests/logs/stdio

Original issue's description:
> Reland of Adds data logging in native AudioDeviceBuffer class (patchset #1 id:1 of https://codereview.webrtc.org/2139233002/ )
>
> Reason for revert:
> My original patch broke things that are now fixed by https://codereview.webrtc.org/2141193002/.
>
> Hence I am relanding my original change.
>
> Original issue's description:
> > Revert of Adds data logging in native AudioDeviceBuffer class (patchset #10 id:180001 of https://codereview.webrtc.org/2132613002/ )
> >
> > Reason for revert:
> > Seems to break things upstream.
> >
> > Original issue's description:
> > > Adds data logging in native AudioDeviceBuffer class.
> > >
> > > Goal is to provide periodic logging of most essential audio parameters
> > > for playout and recording sides. It will allow us to track if the native audio layer is working as intended.
> > >
> > > BUG=NONE
> > >
> > > Committed: https://crrev.com/348e411dd27e6dbe9b84b27ce46e9b7c657c1eae
> > > Cr-Commit-Position: refs/heads/master@{#13440}
> >
> > TBR=stefan@webrtc.org,henrika@webrtc.org
> > # Skipping CQ checks because original CL landed less than 1 days ago.
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=NONE
> >
> > Committed: https://crrev.com/025aa94ccb85e4c6fe20a3fecdac5d27ec9ba3da
> > Cr-Commit-Position: refs/heads/master@{#13441}
>
> TBR=stefan@webrtc.org,sprang@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=NONE
>
> Committed: https://crrev.com/dd2fdecc78c50377d10ec98b41179acde9218ee7
> Cr-Commit-Position: refs/heads/master@{#13455}

TBR=stefan@webrtc.org,sprang@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=NONE

Review-Url: https://codereview.webrtc.org/2141413002
Cr-Commit-Position: refs/heads/master@{#13457}
2016-07-13 09:32:45 +00:00
henrika
dd2fdecc78 Reland of Adds data logging in native AudioDeviceBuffer class (patchset #1 id:1 of https://codereview.webrtc.org/2139233002/ )
Reason for revert:
My original patch broke things that are now fixed by https://codereview.webrtc.org/2141193002/.

Hence I am relanding my original change.

Original issue's description:
> Revert of Adds data logging in native AudioDeviceBuffer class (patchset #10 id:180001 of https://codereview.webrtc.org/2132613002/ )
>
> Reason for revert:
> Seems to break things upstream.
>
> Original issue's description:
> > Adds data logging in native AudioDeviceBuffer class.
> >
> > Goal is to provide periodic logging of most essential audio parameters
> > for playout and recording sides. It will allow us to track if the native audio layer is working as intended.
> >
> > BUG=NONE
> >
> > Committed: https://crrev.com/348e411dd27e6dbe9b84b27ce46e9b7c657c1eae
> > Cr-Commit-Position: refs/heads/master@{#13440}
>
> TBR=stefan@webrtc.org,henrika@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=NONE
>
> Committed: https://crrev.com/025aa94ccb85e4c6fe20a3fecdac5d27ec9ba3da
> Cr-Commit-Position: refs/heads/master@{#13441}

TBR=stefan@webrtc.org,sprang@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=NONE

Review-Url: https://codereview.webrtc.org/2138403003
Cr-Commit-Position: refs/heads/master@{#13455}
2016-07-13 08:49:02 +00:00
sprang
025aa94ccb Revert of Adds data logging in native AudioDeviceBuffer class (patchset #10 id:180001 of https://codereview.webrtc.org/2132613002/ )
Reason for revert:
Seems to break things upstream.

Original issue's description:
> Adds data logging in native AudioDeviceBuffer class.
>
> Goal is to provide periodic logging of most essential audio parameters
> for playout and recording sides. It will allow us to track if the native audio layer is working as intended.
>
> BUG=NONE
>
> Committed: https://crrev.com/348e411dd27e6dbe9b84b27ce46e9b7c657c1eae
> Cr-Commit-Position: refs/heads/master@{#13440}

TBR=stefan@webrtc.org,henrika@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=NONE

Review-Url: https://codereview.webrtc.org/2139233002
Cr-Commit-Position: refs/heads/master@{#13441}
2016-07-12 10:08:51 +00:00
henrika
348e411dd2 Adds data logging in native AudioDeviceBuffer class.
Goal is to provide periodic logging of most essential audio parameters
for playout and recording sides. It will allow us to track if the native audio layer is working as intended.

BUG=NONE

Review-Url: https://codereview.webrtc.org/2132613002
Cr-Commit-Position: refs/heads/master@{#13440}
2016-07-12 09:18:46 +00:00
henrika
3f33e2aa54 Minor refactoring of the AudioDeviceBuffer class
BUG=NONE
NOTRY=true

Review-Url: https://codereview.webrtc.org/2117303002
Cr-Commit-Position: refs/heads/master@{#13389}
2016-07-06 07:34:02 +00:00
henrika
0fd6801c3c clang-format on AudioDeviceBuffer
BUG=NONE
R=magjed@webrtc.org

Review URL: https://codereview.webrtc.org/2119093003 .

Cr-Commit-Position: refs/heads/master@{#13377}
2016-07-04 11:01:41 +00:00
tommi
a6219cc3ef FileWrapper[Impl] modifications and actually remove the "Impl" class.
This is a somewhat involved refactoring of this class. Here's an overview of the changes:

* FileWrapper can now be used as a regular class and instances allocated on the stack.
* The type now has support for move semantics and copy isn't allowed.
* New public ctor with FILE* that can be used instead of OpenFromFileHandle.
* New static Open() method.  The intent of this is to allow opening a file and getting back a FileWrapper instance.  Using this method instead of Create(), will allow us in the future to make the FILE* member pointer, to be const and simplify threading (get rid of the lock).
* Rename the Open() method to is_open() and make it inline.
* The FileWrapper interface is no longer a pure virtual interface.  There's only one implementation so there's no need to go through a vtable for everything.
* Functionality offered by the class, is now reduced.  No support for looping (not clear if that was actually useful to users of that flag), no need to implement the 'read_only_' functionality in the class, since file APIs implement that already, no support for *not* managing the file handle (this wasn't used).  OpenFromFileHandle always "manages" the file.
* Delete the unused WriteText() method and don't support opening files in text mode.  Text mode is only different on Windows and on Windows it translates \n to \r\n, which means that files such as log files, could have a slightly different format on Windows than other platforms.  Besides, tools on Windows can handle UNIX line endings.
* Remove FileName(), change Trace code to manage its own path.
* Rename id_ member variable to file_.
* Removed the open_ member variable since the same functionality can be gotten from just checking the file pointer.
* Don't call CloseFile inside of Write.  Write shouldn't be changing the state of the class beyond just attempting to write.
* Remove concept of looping from FileWrapper and never close inside of Read()
* Changed stream base classes to inherit from a common base class instead of both defining the Rewind method. Ultimately, Id' like to remove these interfaces and just have FileWrapper.
* Remove read_only param from OpenFromFileHandle
* Renamed size_in_bytes_ to position_, since it gets set to 0 when Rewind() is called (and the size actually does not change).
* Switch out rw lock for CriticalSection. The r/w lock was only used for reading when checking the open_ flag.

BUG=

Review-Url: https://codereview.webrtc.org/2054373002
Cr-Commit-Position: refs/heads/master@{#13155}
2016-06-15 17:30:18 +00:00
Peter Kasting
6955870806 Convert channel counts to size_t.
IIRC, this was originally requested by ajm during review of the other size_t conversions I did over the past year, and I agreed it made sense, but wanted to do it separately since those changes were already gargantuan.

BUG=chromium:81439
TEST=none
R=henrik.lundin@webrtc.org, henrika@webrtc.org, kjellander@webrtc.org, minyue@webrtc.org, perkj@webrtc.org, solenberg@webrtc.org, stefan@webrtc.org, tina.legrand@webrtc.org

Review URL: https://codereview.webrtc.org/1316523002 .

Cr-Commit-Position: refs/heads/master@{#11229}
2016-01-13 00:26:55 +00:00
Henrik Kjellander
98f53510b2 system_wrappers: rename interface -> include
BUG=webrtc:5095
R=tommi@webrtc.org

Review URL: https://codereview.webrtc.org/1413333002 .

Cr-Commit-Position: refs/heads/master@{#10438}
2015-10-28 17:17:50 +00:00
Peter Kasting
dce40cf804 Update a ton of audio code to use size_t more correctly and in general reduce
use of int16_t/uint16_t.

This is the upshot of a recommendation by henrik.lundin and kwiberg on an original small change ( https://webrtc-codereview.appspot.com/42569004/#ps1 ) to stop using int16_t just because values could fit in it, and is similar in nature to a previous "mass change to use size_t more" ( https://webrtc-codereview.appspot.com/23129004/ ) which also needed to be split up for review but to land all at once, since, like adding "const", such changes tend to cause a lot of transitive effects.

This was be reviewed and approved in pieces:
https://codereview.webrtc.org/1224093003
https://codereview.webrtc.org/1224123002
https://codereview.webrtc.org/1224163002
https://codereview.webrtc.org/1225133003
https://codereview.webrtc.org/1225173002
https://codereview.webrtc.org/1227163003
https://codereview.webrtc.org/1227203003
https://codereview.webrtc.org/1227213002
https://codereview.webrtc.org/1227893002
https://codereview.webrtc.org/1228793004
https://codereview.webrtc.org/1228803003
https://codereview.webrtc.org/1228823002
https://codereview.webrtc.org/1228823003
https://codereview.webrtc.org/1228843002
https://codereview.webrtc.org/1230693002
https://codereview.webrtc.org/1231713002

The change is being landed as TBR to all the folks who reviewed the above.

BUG=chromium:81439
TEST=none
R=andrew@webrtc.org, pbos@webrtc.org
TBR=aluebs, andrew, asapersson, henrika, hlundin, jan.skoglund, kwiberg, minyue, pbos, pthatcher

Review URL: https://codereview.webrtc.org/1230503003 .

Cr-Commit-Position: refs/heads/master@{#9768}
2015-08-24 21:52:45 +00:00
henrika
ba35d05a49 Cleanup of iOS AudioDevice implementation
TBR=tkchin
BUG=webrtc:4789
TEST=modules_unittests --gtest_filter=AudioDeviceTest* and AppRTCDemo

Review URL: https://codereview.webrtc.org/1206783002 .

Cr-Commit-Position: refs/heads/master@{#9578}
2015-07-14 15:04:19 +00:00
Peter Kasting
728d9037c0 Reformat existing code. There should be no functional effects.
This includes changes like:
* Attempt to break lines at better positions
* Use "override" in more places, don't use "virtual" with it
* Use {} where the body is more than one line
* Make declaration and definition arg names match
* Eliminate unused code
* EXPECT_EQ(expected, actual) (but use (actual, expected) for e.g. _GT)
* Correct #include order
* Use anonymous namespaces in preference to "static" for file-scoping
* Eliminate unnecessary casts
* Update reference code in comments of ARM assembly sources to match actual current C code
* Fix indenting to be more style-guide compliant
* Use arraysize() in more places
* Use bool instead of int for "boolean" values (0/1)
* Shorten and simplify code
* Spaces around operators
* 80 column limit
* Use const more consistently
* Space goes after '*' in type name, not before
* Remove unnecessary return values
* Use "(var == const)", not "(const == var)"
* Spelling
* Prefer true, typed constants to "enum hack" constants
* Avoid "virtual" on non-overridden functions
* ASSERT(x == y) -> ASSERT_EQ(y, x)

BUG=none
R=andrew@webrtc.org, asapersson@webrtc.org, henrika@webrtc.org, juberti@webrtc.org, kjellander@webrtc.org, kwiberg@webrtc.org

Review URL: https://codereview.webrtc.org/1172163004

Cr-Commit-Position: refs/heads/master@{#9420}
2015-06-11 21:31:48 +00:00
Peter Kasting
b7e5054414 Match existing type usage better.
This makes a variety of small changes to synchronize bits of code using different types, remove useless code or casts, and add explicit casts in some places previously doing implicit ones.  For example:

* Change a few type declarations to better match how the majority of code uses those objects.
* Eliminate "< 0" check for unsigned values.
* Replace "(float)sin(x)", where |x| is also a float, with "sinf(x)", and similar.
* Add casts to uint32_t in many places timestamps were used and the existing code stored signed values into the unsigned objects.
* Remove downcasts when the results would be passed to a larger type, e.g. calling "foo((int16_t)x)" with an int |x| when foo() takes an int instead of an int16_t.
* Similarly, add casts when passing a larger type to a function taking a smaller one.
* Add casts to int16_t when doing something like "int16_t = int16_t + int16_t" as the "+" operation would implicitly upconvert to int, and similar.
* Use "false" instead of "0" for setting a bool.
* Shift a few temp types when doing a multi-stage calculation involving typecasts, so as to put the most logical/semantically correct type possible into the temps.  For example, when doing "int foo = int + int; size_t bar = (size_t)foo + size_t;", we might change |foo| to a size_t and move the cast if it makes more sense for |foo| to be represented as a size_t.

BUG=none
R=andrew@webrtc.org, asapersson@webrtc.org, henrika@webrtc.org, juberti@webrtc.org, kwiberg@webrtc.org
TBR=andrew, asapersson, henrika

Review URL: https://codereview.webrtc.org/1168753002

Cr-Commit-Position: refs/heads/master@{#9419}
2015-06-11 19:56:03 +00:00
Tommi
68898a2652 Remove AudioDeviceUtility.
The class doesn't do anything in almost all cases except for grabbing and releasing locks + allocate memory.  There are a couple of methods there such as WaitForKey and GetTimeInMs that are used, but those methods aren't specific to audio and we have implementations of these elsewhere.  The third method, StringCompare isn't used anywhere (and also isn't specific to audio).

BUG=
R=henrika@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/50009004

Cr-Commit-Position: refs/heads/master@{#9220}
2015-05-19 15:27:50 +00:00
wu@webrtc.org
94454b71ad Fix the chain that propagates the audio frame's rtp and ntp timestamp including:
* In AudioCodingModuleImpl::PlayoutData10Ms, don't reset the timestamp got from GetAudio.
* When there're more than one participant, set AudioFrame's RTP timestamp to 0.
* Copy ntp_time_ms_ in AudioFrame::CopyFrom method.
* In RemixAndResample, pass src frame's timestamp_ and ntp_time_ms_ to the dst frame.
* Fix how |elapsed_time_ms| is computed in channel.cc by adding GetPlayoutFrequency.

Tweaks on ntp_time_ms_:
* Init ntp_time_ms_ to -1 in AudioFrame ctor.
* When there're more than one participant, set AudioFrame's ntp_time_ms_ to an invalid value. I.e. we don't support ntp_time_ms_ in multiple participants case before the mixing is moved to chrome.

Added elapsed_time_ms to AudioFrame and pass it to chrome, where we don't have the information about the rtp timestmp's sample rate, i.e. can't convert rtp timestamp to ms.

BUG=3111
R=henrik.lundin@webrtc.org, turaj@webrtc.org, xians@webrtc.org
TBR=andrew
andrew to take another look on audio_conference_mixer_impl.cc

Review URL: https://webrtc-codereview.appspot.com/14559004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6346 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-06-05 20:34:08 +00:00
wu@webrtc.org
cb711f77d2 Add interface to propagate audio capture timestamp to the renderer.
BUG=3111
R=andrew@webrtc.org, turaj@webrtc.org, xians@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/12239004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6189 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-05-19 17:39:11 +00:00
andrew@webrtc.org
2553450959 Fix win trybot errors due to r4729.
The addition of logging.h in r4729 was causing the win trybot to fail
with "#pragma deprecated" errors in standard library headers. This
turned out to be due to including strsafe.h (via audio_device_config.h)
before sstream (via logging.h).

strsafe.h was only being included for the unused DEBUG_PRINT macro. I
removed all references to it.

This incidentally removes a bunch of other unneeded headers discovered
while trying to track the problem down.

This didn't show up in the commitbots; my guess is that the trybots are
using the VC10 toolchain and the commitbots the VC11 toolchain.

TBR=pbos

Review URL: https://webrtc-codereview.appspot.com/2204004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4738 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-09-13 00:02:13 +00:00
andrew@webrtc.org
5eb997a2fd Fix unsigned/signed comparison error due to r4729.
Fix it for real by switching to ints rather than casting.

TBR=xians

Review URL: https://webrtc-codereview.appspot.com/2191009

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4730 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-09-12 01:01:42 +00:00
andrew@webrtc.org
8f94013651 Reduce frequency of high audio delay warning logs.
This will log the warning every 5 seconds instead of every 10 ms.

BUG=b/10674993
TESTED=Ran voe_cmd_test with hard-coded high delay. Observed a log
every 5 seconds.

R=noahric@chromium.org, xians@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/2184009

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4729 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-09-11 22:35:00 +00:00
pbos@webrtc.org
12dc1a38ca Switch C++-style C headers with their C equivalents.
The C++ headers define the C functions within the std:: namespace, but
we mainly don't use the std:: namespace for C functions. Therefore we
should include the C headers.

BUG=1833
R=tommi@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/1917004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4486 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-08-05 16:22:53 +00:00
pbos@webrtc.org
811269df40 Include files from webrtc/.. paths in audio_device/.
BUG=1662
R=xians@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/1785005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4330 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-07-11 13:24:38 +00:00
niklas.enbom@webrtc.org
3be565b502 Refactoring for typing detection
R=henrika@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/1370004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3976 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-05-07 21:04:24 +00:00
xians@webrtc.org
233c58de47 Landing 1399004, Minor clean up on the un-used _measureDelay code
Those code is/will never used, removing it makes the code better.



git-svn-id: http://webrtc.googlecode.com/svn/trunk@3961 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-05-06 11:52:47 +00:00
pbos@webrtc.org
2550988baa WebRtc_Word32 -> int32_t in audio_device/
BUG=314

Review URL: https://webrtc-codereview.appspot.com/1302006

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3793 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-04-09 10:30:35 +00:00
henrika@webrtc.org
19da719a5f Resolves TSan v2 reports data races in voe_auto_test.
--- Note that I will add more fixes to this CL ---

BUG=1590

Review URL: https://webrtc-codereview.appspot.com/1286005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3770 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-04-05 14:34:57 +00:00
andrew@webrtc.org
14b43beb7c Move src/ -> webrtc/
TBR=niklas.enbom@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/915006

git-svn-id: http://webrtc.googlecode.com/svn/trunk@2963 4adac7df-926f-26a2-2b94-8c16560cd09d
2012-10-22 18:19:23 +00:00