forked from wang-bin/QtAV
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Previous volume control was in AudioThread. Thas not reasonable because user must use AVPlayer. Now audio samples are scaled in AudioOutput. Also scale function is updated less. TODO: if SetVolume feature is set (for example backend supports volume control or set by user), use backend implemention
- Loading branch information
Showing
5 changed files
with
115 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/****************************************************************************** | ||
QtAV: Media play library based on Qt and FFmpeg | ||
Copyright (C) 2014 Wang Bin <[email protected]> | ||
Copyright (C) 2014-2015 Wang Bin <[email protected]> | ||
* This file is part of QtAV | ||
|
@@ -87,6 +87,7 @@ int main(int argc, char** argv) | |
left = (left+1) % kTableSize; | ||
right = (right+3)% kTableSize; | ||
} | ||
ao->setVolume(2*sin(2.0*M_PI/1000.0*timer.elapsed())); | ||
ao->play(data); | ||
} | ||
ao->close(); | ||
|