93 Commits

Author SHA1 Message Date
Mike Lockwood
d1f362fe14 AudioService: Fix routing problem recently introduced in setRouting().
Do not disable a route unless routes is zero, to avoid accidentally disabling
if the same route is enabled twice in a row.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-06-16 08:23:13 -04:00
Android (Google) Code Review
3d4b7065e9 Merge change 4047 into donut
* changes:
  Fix issue #899198	MODE_RINGER_STREAMS_AFFECTED does not restore volumes correctly
2009-06-12 08:33:59 -07:00
Eric Laurent
9bcf401d13 Fix issue #899198 MODE_RINGER_STREAMS_AFFECTED does not restore volumes correctly
The problem is that setRingerModeInt() does not handle streams not affected by ringer mode: when enabling "Alarm in silent mode" while in silent mode, setRingerModeInt is called after alarm streamis removed from ringer mode affected streams, and nothing is done.

The fix constists in also processing streams that are not affected by ringer mode and to restore last audible volume for them. It does not arm reapplying the volume for streams the are never affected by ringer mode as we don't do this very often.

The other problem noted in the bug report (ringer volume always restored to non zero value when exiting silent mode even if set to zero before) is also fixed: a new parameter is added to setIndex() and setStreamVolumeInt() to explicitely request to store the volume index as last audible instead of doing it automatically if index > 0.
2009-06-12 06:09:28 -07:00
Nicolas Catania
32f8277488 Removed trailing whitespaces. 2009-06-11 16:54:48 -07:00
Android (Google) Code Review
1d7d5db74f Merge change 3799 into donut
* changes:
  Turned on the windows media related test cases as the binary already integrated.
2009-06-10 17:10:05 -07:00
Yu Shan Emily Lau
afbc17ead2 Turned on the windows media related test cases as the binary already integrated. 2009-06-10 15:46:32 -07:00
Marco Nelissen
a2df60598a Print a message to the log when a file can't be opened on the client side. 2009-06-09 15:49:23 -07:00
Android (Google) Code Review
b2df1699c9 Merge change 1548 into donut
* changes:
  NJ-1409: (frameworks/base) Support new audio encoding types(AMR and AAC).
2009-06-08 15:58:21 -07:00
Yu Shan Emily Lau
32e959163f Capture the memory output before the playback and record start. 2009-06-08 11:29:55 -07:00
Jianhong Jiang
2bcda90c02 NJ-1409: (frameworks/base) Support new audio encoding types(AMR and AAC). 2009-06-08 08:50:42 -07:00
Android (Google) Code Review
162c9d0e90 Merge change 2805 into donut
* changes:
  base: Rename WRITE_SDCARD -> WRITE_EXTERNAL_STORAGE
2009-06-01 09:58:44 -07:00
Android (Google) Code Review
450ad31b62 Merge change 2774 into donut
* changes:
  Limit check on maxChannels for SoundPool. Bug 1838724
2009-06-01 09:57:24 -07:00
San Mehat
5a3a77dabd base: Rename WRITE_SDCARD -> WRITE_EXTERNAL_STORAGE
Signed-off-by: San Mehat <san@google.com>
2009-06-01 09:25:28 -07:00
Dave Sparks
3c8704b171 Limit check on maxChannels for SoundPool.
Bug 1838724
2009-06-01 08:16:19 -07:00
Android (Google) Code Review
0f5179c7d3 Merge change 2716 into donut
* changes:
  Update MediaPlayer to allow setVideoSurface calls after prepare. Also allow passing a null surface. The API is now enabled to change the surface while the video is playing. This could allow orientation changes during playback or to allow the audio track from a video to play in the background. NOTE: There are still changes required to pmem driver to allow remapping shared physical memory into a process in order for this to work. This change only enables the API to send the appropriate calls when the lower level code supports it.
2009-05-29 14:17:44 -07:00
Dave Sparks
8b0b174198 Update MediaPlayer to allow setVideoSurface calls after prepare. Also allow
passing a null surface. The API is now enabled to change the surface while
the video is playing. This could allow orientation changes during playback
or to allow the audio track from a video to play in the background.
NOTE: There are still changes required to pmem driver to allow remapping
shared physical memory into a process in order for this to work. This
change only enables the API to send the appropriate calls when the lower
level code supports it.
2009-05-29 13:51:38 -07:00
Android (Google) Code Review
f6355e24f5 Merge change 2399 into donut
* changes:
  Motorola additions for CDMA support without CdmaSuppConnTracker
2009-05-28 20:29:10 -07:00
Yu Shan Emily Lau
01c0596b75 Added the two validations for the memory stress test
1) Set the maximum memory leakage to 150K in 200 loops of playback.
2) Check the pid of the meidaserver.
2009-05-28 18:59:33 -07:00
Wink Saville
dda5391d50 Motorola additions for CDMA support without CdmaSuppConnTracker
There are corresponding changes to hardware/ril and packages/apps/Phone
that are required to go with these changes.
2009-05-28 17:32:34 -07:00
Dave Sparks
814941997f setVolume did not check interface descriptor
DO NOT MERGE
2009-05-26 14:39:29 -07:00
Eric Laurent
4bc035a65c Fix issue 1846343 - part 1
This change is the first part of a fix for issue 1846343, :
- Added new enum values for input sources in AudioRecord and MediaRecorder for voice uplink, downlink and uplink+downlink sources.
- renamed streamType to inputSource in all native functions handling audio record.

A second change is required in opencore author driver and android audio input to completely fix the issue.
2009-05-26 07:44:28 -07:00
Dave Sparks
6690dc5454 Fix permission hole for RECORD_AUDIO created when we moved the MediaRecorder
implementation to the mediaserver process. The permission check was previously
enforced only at the AudioRecord binder interface for clients not in the same
process. This change adds an additional check when the client tries to set
the audio source.
Bug 1868334
2009-05-20 19:20:31 -07:00
Android (Google) Code Review
379d3bd974 Merge change 2016 into donut
* changes:
  Replaced the old test media files with the new open source test media files. Fix the bug in testGetThumbnail test.
2009-05-19 16:51:29 -07:00
Yu Shan Emily Lau
be467b579e Replaced the old test media files with the new open source test media files.
Fix the bug in testGetThumbnail test.
2009-05-19 15:46:22 -07:00
Yu Shan Emily Lau
f30c700e13 Added the write sdcard permission so that the mediarecorder test
can write the new recorded video into sdcard.
2009-05-19 15:14:51 -07:00
Marco Nelissen
77f2c4c1f9 Document the media scanner's flow through native and java code, since
I always forget how it works after a while.
2009-05-19 10:00:33 -07:00
Xia Wang
55eef638fa Add a tool to play all kinds of media files saved in /sdcard/media_api/samples/. It also tests the seeking functionality during the play of each sample file. 2009-05-15 15:03:33 -07:00
Marco Nelissen
d282ac8610 Findbugs fixes. 2009-05-14 13:18:16 -07:00
Android (Google) Code Review
7f2ae493c5 Merge change 1370 into donut
* changes:
  Fix a JNI layer crash due to null camera object passed to get_native_camera() The fix will check on the camera object and if it is a null object, we throw a NullPointerException; application layer should also avoid passing a null java object to MediaRecorder.setCamera().
2009-05-11 12:18:55 -07:00
James Dong
429a3b5f1d Fix a JNI layer crash due to null camera object passed to get_native_camera()
The fix will check on the camera object and if it is a null object, we
throw a NullPointerException; application layer should also avoid passing a null
java object to MediaRecorder.setCamera().
2009-05-11 10:58:03 -07:00
Android (Google) Code Review
b85c37432b Merge change 1155 into donut
* changes:
  Don't allow negative numbers in ToneGenerator toneType parameter Bug 1836596
2009-05-07 11:52:06 -07:00
Android (Google) Code Review
0efb086884 Merge change 1120 into donut
* changes:
  Suppress all tests on Windows Media in MediaPlayerApiTest and MediaMetadataTest (Currently not supported by OpenCore 2.0)
2009-05-07 09:34:28 -07:00
Dave Sparks
4c92247098 Don't allow negative numbers in ToneGenerator toneType parameter
Bug 1836596
2009-05-07 09:26:06 -07:00
Eric Laurent
9648e4b677 fix issue 1641535: SoundPool should use AudioTrack with shared memory buffer
Enabled USE_SHARED_MEM_BUFFER switch in SoundPool.cpp
2009-05-07 03:14:31 -07:00
Xia Wang
fe1766474b Suppress all tests on Windows Media in MediaPlayerApiTest and MediaMetadataTest
(Currently not supported by OpenCore 2.0)
2009-05-06 21:12:39 -07:00
Eric Laurent
f3af740bdf Fixed issue 1709450: Requirements for CDMA Tone Generator
Added new tone types for CDMA IS-95 specific tones.
Automatic selection between IS-95, CEPT and JAPAN version base on operator
country code for call supervisory tones.
Also improved tone generator capabilities:
- Each tone segment can now generate its own set of frequencies
- A tone does not have to be a succession of alternating ON/OFF segments
- The sequence repetition does not have to start from first segment
2009-05-06 11:35:46 -07:00
Eric Laurent
b9c9d260f2 fix issue 1713090: After a Bluetooth call, MusicPlayer starts playing on speaker rather than wired external audio.
Temporary fix until audio routing is refactored in Eclair release:
- centralized and synchronized all audio routing control in AudioService.setRouting()
- deprecated AudioManager.setRouting() and AudioManager.getRouting() methods
2009-05-06 10:52:19 -07:00
Yu Shan Emily Lau
c1b80cb7e3 Changes in mediaframework test for the OpenCore 2.0 integration. Changes included:
1) The default value for the metatData
2) Add the videoSizedChange callback to get the video dimension
Added the test cases for the async reset callback test case for the Qualcomm new realease.
2009-05-05 17:29:53 -07:00
James Dong
c02cac481c Change 79 in git master branch 2009-04-30 23:42:56 -07:00
Android (Google) Code Review
7fe3b064d3 Merge change 740 into donut
* changes:
  MIDI render thread was nice 0, should be nice -16. Seems like a recent change sets the thread priority to 0. Previously it inherited priority from the parent thread. This change sets the MIDI render thread priority to the default for audio threads. Reference bug 1800905
2009-04-29 15:27:15 -07:00
Dave Sparks
c082769b67 MIDI render thread was nice 0, should be nice -16.
Seems like a recent change sets the thread priority to 0. Previously it
inherited priority from the parent thread. This change sets the MIDI
render thread priority to the default for audio threads.
Reference bug 1800905
2009-04-29 12:59:33 -07:00
Dave Sparks
0e051b189f Vorbis render thread was nice 0, should be nice -16.
Seems like a recent change sets the thread priority to 0. Previously it
inherited priority from the parent thread. This change sets the Vorbis
render thread priority to the default for audio threads.
Reference bug 1800905
2009-04-29 12:42:28 -07:00
Yu Shan Emily Lau
2071043512 Modify and turn on the test case for video recording in portrait mode. 2009-04-23 21:46:55 -07:00
Marco Nelissen
9f0b1a4850 Do case-insensitive matching when determining whether something is music, an alarm sound, notification sound, etc. 2009-04-22 10:34:12 -07:00
Eric Laurent
ef02827d4c Fix issue 1745312: Various cleanups in media framework
AudioTrack, AudioRecord:
  - remove useless mAudioFlinger member of AudioTrack and AudioRecord.
  - signal cblk.cv condition in stop() method to speed up stop completion.
  - extend wait condition timeout in obtainBuffer() when waitCount is -1 to avoid waking up callback thread unnecessarily

AudioFlinger:
  - remove some warnings in AudioFlinger.cpp.
  - remove function AudioFlinger::MixerThread::removetrack_l()  as its content is never executed.
  - remove useless call to setMasterVolume in AudioFlinger::handleForcedSpeakerRoute().
  - Offset VOICE_CALL stream volume to reflect actual volume that is never 0 in hardware (this fix has been made in the open source): 0.01 + v * 0.99.

AudioSystem.java:
  - correct typo in comment

IAudioflinger, IAudioFlingerClient:
  - make AudioFlinger binder interfaces used for callbacks ONEWAY.

AudioHardwareInterface:
  - correct routeStrings[] table in AudioHardwareInteface.cpp
2009-04-21 07:56:33 -07:00
Jean-Michel Trivi
6fb5a1d0ee AI 147035: am: CL 147032 Finalize JetPlayer javadoc.
Original author: jmtrivi
  Merged from: //branches/cupcake/...

Automated import of CL 147035
2009-04-20 16:30:18 -07:00
Jean-Michel Trivi
ea63a41d26 AI 146938: am: CL 146937 Finalize AudioRecord javadoc.
Original author: jmtrivi
  Merged from: //branches/cupcake/...

Automated import of CL 146938
2009-04-20 10:45:23 -07:00
Dave Sparks
6cb9900e6f AI 146755: am: CL 146754 Fix some problems in the SoundPool docs and add additional text.
Original author: davidsparks
  Merged from: //branches/cupcake/...

Automated import of CL 146755
2009-04-17 11:48:25 -07:00
Jean-Michel Trivi
ff14c25339 AI 146752: am: CL 146751 Finalize AudioTrack javadoc.
Original author: jmtrivi
  Merged from: //branches/cupcake/...

Automated import of CL 146752
2009-04-17 11:45:30 -07:00
Dave Sparks
2170312ab0 AI 146668: am: CL 146667 Add advice in MediaRecorder Java docs about using MPEG-4 container format
Original author: davidsparks
  Merged from: //branches/cupcake/...

Automated import of CL 146668
2009-04-16 19:54:16 -07:00