Skip to content
Browse files

Converted all files to unix line-endings.

  • Loading branch information...
1 parent eca5650 commit a0043001c653f4da8b2b1f4a744c0d03dc1928ff Nicolas Gramlich committed Nov 22, 2011
Showing with 9,889 additions and 9,889 deletions.
  1. +7 −7 .classpath
  2. +33 −33 .project
  3. +9 −9 AndroidManifest.xml
  4. +85 −85 build.xml
  5. +31 −31 ext/img/android.svg
  6. +5 −5 jni/build.bat
  7. +14 −14 project.properties
  8. +160 −160 src/org/anddev/andengine/audio/BaseAudioEntity.java
  9. +82 −82 src/org/anddev/andengine/audio/BaseAudioManager.java
  10. +36 −36 src/org/anddev/andengine/audio/IAudioEntity.java
  11. +26 −26 src/org/anddev/andengine/audio/IAudioManager.java
  12. +57 −57 src/org/anddev/andengine/audio/exception/AudioException.java
  13. +149 −149 src/org/anddev/andengine/audio/music/Music.java
  14. +110 −110 src/org/anddev/andengine/audio/music/MusicFactory.java
  15. +39 −39 src/org/anddev/andengine/audio/music/MusicLibrary.java
  16. +44 −44 src/org/anddev/andengine/audio/music/MusicManager.java
  17. +57 −57 src/org/anddev/andengine/audio/music/exception/MusicException.java
  18. +39 −39 src/org/anddev/andengine/audio/music/exception/MusicReleasedException.java
  19. +164 −164 src/org/anddev/andengine/audio/sound/Sound.java
  20. +101 −101 src/org/anddev/andengine/audio/sound/SoundFactory.java
  21. +40 −40 src/org/anddev/andengine/audio/sound/SoundLibrary.java
  22. +66 −66 src/org/anddev/andengine/audio/sound/SoundManager.java
  23. +57 −57 src/org/anddev/andengine/audio/sound/exception/SoundException.java
  24. +39 −39 src/org/anddev/andengine/audio/sound/exception/SoundReleasedException.java
  25. +122 −122 src/org/anddev/andengine/collision/BaseCollisionChecker.java
  26. +60 −60 src/org/anddev/andengine/collision/LineCollisionChecker.java
  27. +132 −132 src/org/anddev/andengine/collision/RectangularShapeCollisionChecker.java
  28. +111 −111 src/org/anddev/andengine/collision/ShapeCollisionChecker.java
  29. +89 −89 src/org/anddev/andengine/collision/TriangleCollisionChecker.java
  30. +739 −739 src/org/anddev/andengine/engine/Engine.java
  31. +63 −63 src/org/anddev/andengine/engine/FixedStepEngine.java
  32. +66 −66 src/org/anddev/andengine/engine/LimitedFPSEngine.java
  33. +183 −183 src/org/anddev/andengine/engine/camera/BoundCamera.java
  34. +523 −523 src/org/anddev/andengine/engine/camera/Camera.java
  35. +54 −54 src/org/anddev/andengine/engine/camera/CameraFactory.java
  36. +182 −182 src/org/anddev/andengine/engine/camera/SmoothCamera.java
  37. +163 −163 src/org/anddev/andengine/engine/camera/ZoomCamera.java
  38. +51 −51 src/org/anddev/andengine/engine/camera/hud/HUD.java
  39. +106 −106 src/org/anddev/andengine/engine/camera/hud/controls/AnalogOnScreenControl.java
  40. +216 −216 src/org/anddev/andengine/engine/camera/hud/controls/BaseOnScreenControl.java
  41. +120 −120 src/org/anddev/andengine/engine/camera/hud/controls/DigitalOnScreenControl.java
  42. +66 −66 src/org/anddev/andengine/engine/handler/BaseEntityUpdateHandler.java
  43. +58 −58 src/org/anddev/andengine/engine/handler/DrawHandlerList.java
  44. +23 −23 src/org/anddev/andengine/engine/handler/IDrawHandler.java
  45. +39 −39 src/org/anddev/andengine/engine/handler/IUpdateHandler.java
  46. +66 −66 src/org/anddev/andengine/engine/handler/UpdateHandlerList.java
  47. +89 −89 src/org/anddev/andengine/engine/handler/collision/CollisionHandler.java
  48. +27 −27 src/org/anddev/andengine/engine/handler/collision/ICollisionCallback.java
  49. +163 −163 src/org/anddev/andengine/engine/handler/physics/PhysicsHandler.java
  50. +63 −63 src/org/anddev/andengine/engine/handler/runnable/RunnableHandler.java
  51. +20 −20 src/org/anddev/andengine/engine/handler/timer/ITimerCallback.java
  52. +109 −109 src/org/anddev/andengine/engine/handler/timer/TimerHandler.java
  53. +126 −126 src/org/anddev/andengine/engine/options/EngineOptions.java
  54. +51 −51 src/org/anddev/andengine/engine/options/RenderOptions.java
  55. +63 −63 src/org/anddev/andengine/engine/options/WakeLockOptions.java
  56. +49 −49 src/org/anddev/andengine/engine/options/resolutionpolicy/BaseResolutionPolicy.java
  57. +52 −52 src/org/anddev/andengine/engine/options/resolutionpolicy/FillResolutionPolicy.java
  58. +53 −53 src/org/anddev/andengine/engine/options/resolutionpolicy/FixedResolutionPolicy.java
  59. +22 −22 src/org/anddev/andengine/engine/options/resolutionpolicy/IResolutionPolicy.java
  60. +75 −75 src/org/anddev/andengine/engine/options/resolutionpolicy/RatioResolutionPolicy.java
  61. +64 −64 src/org/anddev/andengine/engine/options/resolutionpolicy/RelativeResolutionPolicy.java
  62. +182 −182 src/org/anddev/andengine/engine/splitscreen/DoubleSceneSplitScreenEngine.java
  63. +137 −137 src/org/anddev/andengine/engine/splitscreen/SingleSceneSplitScreenEngine.java
  64. +1,220 −1,220 src/org/anddev/andengine/entity/Entity.java
  65. +287 −287 src/org/anddev/andengine/entity/IEntity.java
  66. +20 −20 src/org/anddev/andengine/entity/IEntityFactory.java
  67. +78 −78 src/org/anddev/andengine/entity/ZIndexSorter.java
  68. +77 −77 src/org/anddev/andengine/entity/modifier/AlphaModifier.java
  69. +94 −94 src/org/anddev/andengine/entity/modifier/ColorModifier.java
  70. +111 −111 src/org/anddev/andengine/entity/modifier/CubicBezierMoveModifier.java
  71. +67 −67 src/org/anddev/andengine/entity/modifier/DelayModifier.java
  72. +52 −52 src/org/anddev/andengine/entity/modifier/DoubleValueChangeEntityModifier.java
  73. +62 −62 src/org/anddev/andengine/entity/modifier/DoubleValueSpanEntityModifier.java
  74. +53 −53 src/org/anddev/andengine/entity/modifier/DurationEntityModifier.java
  75. +49 −49 src/org/anddev/andengine/entity/modifier/EntityModifier.java
  76. +51 −51 src/org/anddev/andengine/entity/modifier/EntityModifierList.java
  77. +67 −67 src/org/anddev/andengine/entity/modifier/FadeInModifier.java
  78. +67 −67 src/org/anddev/andengine/entity/modifier/FadeOutModifier.java
  79. +49 −49 src/org/anddev/andengine/entity/modifier/IEntityModifier.java
  80. +80 −80 src/org/anddev/andengine/entity/modifier/LoopEntityModifier.java
  81. +61 −61 src/org/anddev/andengine/entity/modifier/MoveByModifier.java
  82. +77 −77 src/org/anddev/andengine/entity/modifier/MoveModifier.java
  83. +77 −77 src/org/anddev/andengine/entity/modifier/MoveXModifier.java
  84. +77 −77 src/org/anddev/andengine/entity/modifier/MoveYModifier.java
  85. +58 −58 src/org/anddev/andengine/entity/modifier/ParallelEntityModifier.java
  86. +331 −331 src/org/anddev/andengine/entity/modifier/PathModifier.java
  87. +90 −90 src/org/anddev/andengine/entity/modifier/QuadraticBezierMoveModifier.java
  88. +87 −87 src/org/anddev/andengine/entity/modifier/RotationAtModifier.java
  89. +62 −62 src/org/anddev/andengine/entity/modifier/RotationByModifier.java
  90. +77 −77 src/org/anddev/andengine/entity/modifier/RotationModifier.java
  91. +97 −97 src/org/anddev/andengine/entity/modifier/ScaleAtModifier.java
  92. +93 −93 src/org/anddev/andengine/entity/modifier/ScaleModifier.java
  93. +76 −76 src/org/anddev/andengine/entity/modifier/SequenceEntityModifier.java
  94. +53 −53 src/org/anddev/andengine/entity/modifier/SingleValueChangeEntityModifier.java
  95. +62 −62 src/org/anddev/andengine/entity/modifier/SingleValueSpanEntityModifier.java
Sorry, we could not display the entire diff because too many files (455) changed.
View
14 .classpath
@@ -1,7 +1,7 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="src" path="gen"/>
- <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
- <classpathentry kind="output" path="bin/classes"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="gen"/>
+ <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
+ <classpathentry kind="output" path="bin/classes"/>
+</classpath>
View
66 .project
@@ -1,33 +1,33 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>AndEngine</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>com.android.ide.eclipse.adt.ApkBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>com.android.ide.eclipse.adt.AndroidNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>AndEngine</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>com.android.ide.eclipse.adt.ApkBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.android.ide.eclipse.adt.AndroidNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
View
18 AndroidManifest.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="org.anddev.andengine"
- android:versionCode="1"
- android:versionName="1.0">
-
- <uses-sdk android:minSdkVersion="4"/>
-
- <application android:debuggable="true"/>
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="org.anddev.andengine"
+ android:versionCode="1"
+ android:versionName="1.0">
+
+ <uses-sdk android:minSdkVersion="4"/>
+
+ <application android:debuggable="true"/>
</manifest>
View
170 build.xml
@@ -1,85 +1,85 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project name="AndEngine" default="help">
-
- <!-- The local.properties file is created and updated by the 'android' tool.
- It contains the path to the SDK. It should *NOT* be checked into
- Version Control Systems. -->
- <loadproperties srcFile="local.properties" />
-
- <!-- The ant.properties file can be created by you. It is only edited by the
- 'android' tool to add properties to it.
- This is the place to change some Ant specific build properties.
- Here are some properties you may want to change/update:
-
- source.dir
- The name of the source directory. Default is 'src'.
- out.dir
- The name of the output directory. Default is 'bin'.
-
- For other overridable properties, look at the beginning of the rules
- files in the SDK, at tools/ant/build.xml
-
- Properties related to the SDK location or the project target should
- be updated using the 'android' tool with the 'update' action.
-
- This file is an integral part of the build system for your
- application and should be checked into Version Control Systems.
-
- -->
- <property file="ant.properties" />
-
- <!-- The project.properties file is created and updated by the 'android'
- tool, as well as ADT.
-
- This contains project specific properties such as project target, and library
- dependencies. Lower level build properties are stored in ant.properties
- (or in .classpath for Eclipse projects).
-
- This file is an integral part of the build system for your
- application and should be checked into Version Control Systems. -->
- <loadproperties srcFile="project.properties" />
-
- <!-- quick check on sdk.dir -->
- <fail
- message="sdk.dir is missing. Make sure to generate local.properties using 'android update project'"
- unless="sdk.dir"
- />
-
-
-<!-- extension targets. Uncomment the ones where you want to do custom work
- in between standard targets -->
-<!--
- <target name="-pre-build">
- </target>
- <target name="-pre-compile">
- </target>
-
- /* This is typically used for code obfuscation.
- Compiled code location: ${out.classes.absolute.dir}
- If this is not done in place, override ${out.dex.input.absolute.dir} */
- <target name="-post-compile">
- </target>
--->
-
- <!-- Import the actual build file.
-
- To customize existing targets, there are two options:
- - Customize only one target:
- - copy/paste the target into this file, *before* the
- <import> task.
- - customize it to your needs.
- - Customize the whole content of build.xml
- - copy/paste the content of the rules files (minus the top node)
- into this file, replacing the <import> task.
- - customize to your needs.
-
- ***********************
- ****** IMPORTANT ******
- ***********************
- In all cases you must update the value of version-tag below to read 'custom' instead of an integer,
- in order to avoid having your file be overridden by tools such as "android update project"
- -->
- <!-- version-tag: 1 -->
- <import file="${sdk.dir}/tools/ant/build.xml" />
-
-</project>
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="AndEngine" default="help">
+
+ <!-- The local.properties file is created and updated by the 'android' tool.
+ It contains the path to the SDK. It should *NOT* be checked into
+ Version Control Systems. -->
+ <loadproperties srcFile="local.properties" />
+
+ <!-- The ant.properties file can be created by you. It is only edited by the
+ 'android' tool to add properties to it.
+ This is the place to change some Ant specific build properties.
+ Here are some properties you may want to change/update:
+
+ source.dir
+ The name of the source directory. Default is 'src'.
+ out.dir
+ The name of the output directory. Default is 'bin'.
+
+ For other overridable properties, look at the beginning of the rules
+ files in the SDK, at tools/ant/build.xml
+
+ Properties related to the SDK location or the project target should
+ be updated using the 'android' tool with the 'update' action.
+
+ This file is an integral part of the build system for your
+ application and should be checked into Version Control Systems.
+
+ -->
+ <property file="ant.properties" />
+
+ <!-- The project.properties file is created and updated by the 'android'
+ tool, as well as ADT.
+
+ This contains project specific properties such as project target, and library
+ dependencies. Lower level build properties are stored in ant.properties
+ (or in .classpath for Eclipse projects).
+
+ This file is an integral part of the build system for your
+ application and should be checked into Version Control Systems. -->
+ <loadproperties srcFile="project.properties" />
+
+ <!-- quick check on sdk.dir -->
+ <fail
+ message="sdk.dir is missing. Make sure to generate local.properties using 'android update project'"
+ unless="sdk.dir"
+ />
+
+
+<!-- extension targets. Uncomment the ones where you want to do custom work
+ in between standard targets -->
+<!--
+ <target name="-pre-build">
+ </target>
+ <target name="-pre-compile">
+ </target>
+
+ /* This is typically used for code obfuscation.
+ Compiled code location: ${out.classes.absolute.dir}
+ If this is not done in place, override ${out.dex.input.absolute.dir} */
+ <target name="-post-compile">
+ </target>
+-->
+
+ <!-- Import the actual build file.
+
+ To customize existing targets, there are two options:
+ - Customize only one target:
+ - copy/paste the target into this file, *before* the
+ <import> task.
+ - customize it to your needs.
+ - Customize the whole content of build.xml
+ - copy/paste the content of the rules files (minus the top node)
+ into this file, replacing the <import> task.
+ - customize to your needs.
+
+ ***********************
+ ****** IMPORTANT ******
+ ***********************
+ In all cases you must update the value of version-tag below to read 'custom' instead of an integer,
+ in order to avoid having your file be overridden by tools such as "android update project"
+ -->
+ <!-- version-tag: 1 -->
+ <import file="${sdk.dir}/tools/ant/build.xml" />
+
+</project>
View
62 ext/img/android.svg
@@ -1,32 +1,32 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://web.resource.org/cc/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="120" height="140" id="svg2" sodipodi:version="0.32" inkscape:version="0.45.1" sodipodi:docbase="H:\kk_files\Robotics\robot-p" sodipodi:docname="android3.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" version="1.0">
- <defs id="defs4"/>
- <sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" gridtolerance="10000" guidetolerance="10" objecttolerance="10" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="0.98994949" inkscape:cx="437.02723" inkscape:cy="229.42076" inkscape:document-units="px" inkscape:current-layer="layer1" inkscape:window-width="1024" inkscape:window-height="712" inkscape:window-x="-4" inkscape:window-y="-4"/>
- <metadata id="metadata7">
- <rdf:RDF>
- <cc:Work rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g inkscape:label="Layer 1" inkscape:groupmode="layer" id="layer1">
- <g id="g3279" transform="translate(-299.005, -503.076)">
- <g style="fill: rgb(151, 192, 36); fill-opacity: 1;" id="g3228">
- <path style="opacity: 0.977778; fill: rgb(151, 192, 36); fill-opacity: 1; stroke: none; stroke-width: 0.9; stroke-linejoin: miter; stroke-miterlimit: 4; stroke-dasharray: none; stroke-opacity: 0.401316;" d="M 356.78125,519.875 C 338.24982,519.875 323.21876,532.38118 323.21875,547.81717 C 323.21875,548.86547 323.27113,549.91011 323.40625,550.92857 L 390.15625,550.92857 C 390.29137,549.91011 390.34375,548.86547 390.34375,547.81717 C 390.34375,532.38118 375.31268,519.87502 356.78125,519.875 z " id="path2170"/>
- <path style="opacity: 0.977778; fill: rgb(151, 192, 36); fill-opacity: 1; stroke: none; stroke-width: 0.9; stroke-linejoin: miter; stroke-miterlimit: 4; stroke-dasharray: none; stroke-opacity: 0.401316;" d="M 322.96875,553.0625 L 322.96875,603.32078 C 322.96875,607.41959 327.39653,610.71877 332.89448,610.71875 L 380.23498,610.71875 C 385.73292,610.71875 390.1607,607.41959 390.16071,603.32078 L 390.16071,553.0625 L 322.96875,553.0625 z " id="rect3158"/>
- <rect style="opacity: 0.977778; fill: rgb(151, 192, 36); fill-opacity: 1; stroke: none; stroke-width: 0.9; stroke-linejoin: miter; stroke-miterlimit: 4; stroke-dasharray: none; stroke-opacity: 0.401316;" id="rect3162" width="15.357142" height="37.857143" x="336.76315" y="597.04773" rx="9.7377472" ry="7.6109033"/>
- <rect ry="7.6109033" rx="9.7377472" y="597.04773" x="361.77332" height="37.857143" width="15.357142" id="rect3164" style="opacity: 0.977778; fill: rgb(151, 192, 36); fill-opacity: 1; stroke: none; stroke-width: 0.9; stroke-linejoin: miter; stroke-miterlimit: 4; stroke-dasharray: none; stroke-opacity: 0.401316;"/>
- <rect ry="7.6920147" rx="9.7377472" y="551.79077" x="393.03571" height="47.142857" width="15.357142" id="rect3169" style="opacity: 0.977778; fill: rgb(151, 192, 36); fill-opacity: 1; stroke: none; stroke-width: 0.9; stroke-linejoin: miter; stroke-miterlimit: 4; stroke-dasharray: none; stroke-opacity: 0.401316;"/>
- <rect style="opacity: 0.977778; fill: rgb(151, 192, 36); fill-opacity: 1; stroke: none; stroke-width: 0.9; stroke-linejoin: miter; stroke-miterlimit: 4; stroke-dasharray: none; stroke-opacity: 0.401316;" id="rect3171" width="15.357142" height="47.142857" x="305.03571" y="551.79077" rx="9.7377472" ry="7.6920147"/>
- <rect style="opacity: 0.977778; fill: rgb(151, 192, 36); fill-opacity: 1; stroke: none; stroke-width: 0.9; stroke-linejoin: miter; stroke-miterlimit: 4; stroke-dasharray: none; stroke-opacity: 0.401316;" id="rect3191" width="14.824304" height="2.6225123" x="613.59875" y="-68.508736" rx="1.4815128" ry="1.2636521" transform="matrix(0.453399, 0.891308, -0.84966, 0.527331, 0, 0)"/>
- <rect transform="matrix(-0.463044, 0.886335, 0.855858, 0.517211, 0, 0)" ry="1.254501" rx="1.4506518" y="572.20447" x="242.79608" height="2.6035209" width="14.515503" id="rect3193" style="opacity: 0.977778; fill: rgb(151, 192, 36); fill-opacity: 1; stroke: none; stroke-width: 0.9; stroke-linejoin: miter; stroke-miterlimit: 4; stroke-dasharray: none; stroke-opacity: 0.401316;"/>
- <path sodipodi:type="arc" style="opacity: 0.977778; fill: rgb(151, 192, 36); fill-opacity: 1; stroke: none; stroke-width: 0.9; stroke-linejoin: miter; stroke-miterlimit: 4; stroke-dasharray: none; stroke-opacity: 0.401316;" id="path3196" sodipodi:cx="341.96429" sodipodi:cy="536.11218" sodipodi:rx="3.0357144" sodipodi:ry="3.0357144" d="M 345.00001 536.11218 A 3.0357144 3.0357144 0 1 1 338.92858,536.11218 A 3.0357144 3.0357144 0 1 1 345.00001 536.11218 z" transform="translate(-0.571429, -0.714286)"/>
- <path transform="translate(30.3214, -0.714286)" d="M 345.00001 536.11218 A 3.0357144 3.0357144 0 1 1 338.92858,536.11218 A 3.0357144 3.0357144 0 1 1 345.00001 536.11218 z" sodipodi:ry="3.0357144" sodipodi:rx="3.0357144" sodipodi:cy="536.11218" sodipodi:cx="341.96429" id="path3198" style="opacity: 0.977778; fill: rgb(151, 192, 36); fill-opacity: 1; stroke: none; stroke-width: 0.9; stroke-linejoin: miter; stroke-miterlimit: 4; stroke-dasharray: none; stroke-opacity: 0.401316;" sodipodi:type="arc"/>
- </g>
- <path sodipodi:type="arc" style="opacity: 0.977778; fill: rgb(255, 255, 255); fill-opacity: 1; stroke: none; stroke-width: 0.9; stroke-linejoin: miter; stroke-miterlimit: 4; stroke-dasharray: none; stroke-opacity: 0.401316;" id="path3224" sodipodi:cx="341.96429" sodipodi:cy="536.11218" sodipodi:rx="3.0357144" sodipodi:ry="3.0357144" d="M 345.00001 536.11218 A 3.0357144 3.0357144 0 1 1 338.92858,536.11218 A 3.0357144 3.0357144 0 1 1 345.00001 536.11218 z" transform="translate(-0.57143, -0.714286)"/>
- <path transform="translate(30.3214, -0.714286)" d="M 345.00001 536.11218 A 3.0357144 3.0357144 0 1 1 338.92858,536.11218 A 3.0357144 3.0357144 0 1 1 345.00001 536.11218 z" sodipodi:ry="3.0357144" sodipodi:rx="3.0357144" sodipodi:cy="536.11218" sodipodi:cx="341.96429" id="path3226" style="opacity: 0.977778; fill: rgb(255, 255, 255); fill-opacity: 1; stroke: none; stroke-width: 0.9; stroke-linejoin: miter; stroke-miterlimit: 4; stroke-dasharray: none; stroke-opacity: 0.401316;" sodipodi:type="arc"/>
- </g>
- </g>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://web.resource.org/cc/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="120" height="140" id="svg2" sodipodi:version="0.32" inkscape:version="0.45.1" sodipodi:docbase="H:\kk_files\Robotics\robot-p" sodipodi:docname="android3.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" version="1.0">
+ <defs id="defs4"/>
+ <sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" gridtolerance="10000" guidetolerance="10" objecttolerance="10" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="0.98994949" inkscape:cx="437.02723" inkscape:cy="229.42076" inkscape:document-units="px" inkscape:current-layer="layer1" inkscape:window-width="1024" inkscape:window-height="712" inkscape:window-x="-4" inkscape:window-y="-4"/>
+ <metadata id="metadata7">
+ <rdf:RDF>
+ <cc:Work rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g inkscape:label="Layer 1" inkscape:groupmode="layer" id="layer1">
+ <g id="g3279" transform="translate(-299.005, -503.076)">
+ <g style="fill: rgb(151, 192, 36); fill-opacity: 1;" id="g3228">
+ <path style="opacity: 0.977778; fill: rgb(151, 192, 36); fill-opacity: 1; stroke: none; stroke-width: 0.9; stroke-linejoin: miter; stroke-miterlimit: 4; stroke-dasharray: none; stroke-opacity: 0.401316;" d="M 356.78125,519.875 C 338.24982,519.875 323.21876,532.38118 323.21875,547.81717 C 323.21875,548.86547 323.27113,549.91011 323.40625,550.92857 L 390.15625,550.92857 C 390.29137,549.91011 390.34375,548.86547 390.34375,547.81717 C 390.34375,532.38118 375.31268,519.87502 356.78125,519.875 z " id="path2170"/>
+ <path style="opacity: 0.977778; fill: rgb(151, 192, 36); fill-opacity: 1; stroke: none; stroke-width: 0.9; stroke-linejoin: miter; stroke-miterlimit: 4; stroke-dasharray: none; stroke-opacity: 0.401316;" d="M 322.96875,553.0625 L 322.96875,603.32078 C 322.96875,607.41959 327.39653,610.71877 332.89448,610.71875 L 380.23498,610.71875 C 385.73292,610.71875 390.1607,607.41959 390.16071,603.32078 L 390.16071,553.0625 L 322.96875,553.0625 z " id="rect3158"/>
+ <rect style="opacity: 0.977778; fill: rgb(151, 192, 36); fill-opacity: 1; stroke: none; stroke-width: 0.9; stroke-linejoin: miter; stroke-miterlimit: 4; stroke-dasharray: none; stroke-opacity: 0.401316;" id="rect3162" width="15.357142" height="37.857143" x="336.76315" y="597.04773" rx="9.7377472" ry="7.6109033"/>
+ <rect ry="7.6109033" rx="9.7377472" y="597.04773" x="361.77332" height="37.857143" width="15.357142" id="rect3164" style="opacity: 0.977778; fill: rgb(151, 192, 36); fill-opacity: 1; stroke: none; stroke-width: 0.9; stroke-linejoin: miter; stroke-miterlimit: 4; stroke-dasharray: none; stroke-opacity: 0.401316;"/>
+ <rect ry="7.6920147" rx="9.7377472" y="551.79077" x="393.03571" height="47.142857" width="15.357142" id="rect3169" style="opacity: 0.977778; fill: rgb(151, 192, 36); fill-opacity: 1; stroke: none; stroke-width: 0.9; stroke-linejoin: miter; stroke-miterlimit: 4; stroke-dasharray: none; stroke-opacity: 0.401316;"/>
+ <rect style="opacity: 0.977778; fill: rgb(151, 192, 36); fill-opacity: 1; stroke: none; stroke-width: 0.9; stroke-linejoin: miter; stroke-miterlimit: 4; stroke-dasharray: none; stroke-opacity: 0.401316;" id="rect3171" width="15.357142" height="47.142857" x="305.03571" y="551.79077" rx="9.7377472" ry="7.6920147"/>
+ <rect style="opacity: 0.977778; fill: rgb(151, 192, 36); fill-opacity: 1; stroke: none; stroke-width: 0.9; stroke-linejoin: miter; stroke-miterlimit: 4; stroke-dasharray: none; stroke-opacity: 0.401316;" id="rect3191" width="14.824304" height="2.6225123" x="613.59875" y="-68.508736" rx="1.4815128" ry="1.2636521" transform="matrix(0.453399, 0.891308, -0.84966, 0.527331, 0, 0)"/>
+ <rect transform="matrix(-0.463044, 0.886335, 0.855858, 0.517211, 0, 0)" ry="1.254501" rx="1.4506518" y="572.20447" x="242.79608" height="2.6035209" width="14.515503" id="rect3193" style="opacity: 0.977778; fill: rgb(151, 192, 36); fill-opacity: 1; stroke: none; stroke-width: 0.9; stroke-linejoin: miter; stroke-miterlimit: 4; stroke-dasharray: none; stroke-opacity: 0.401316;"/>
+ <path sodipodi:type="arc" style="opacity: 0.977778; fill: rgb(151, 192, 36); fill-opacity: 1; stroke: none; stroke-width: 0.9; stroke-linejoin: miter; stroke-miterlimit: 4; stroke-dasharray: none; stroke-opacity: 0.401316;" id="path3196" sodipodi:cx="341.96429" sodipodi:cy="536.11218" sodipodi:rx="3.0357144" sodipodi:ry="3.0357144" d="M 345.00001 536.11218 A 3.0357144 3.0357144 0 1 1 338.92858,536.11218 A 3.0357144 3.0357144 0 1 1 345.00001 536.11218 z" transform="translate(-0.571429, -0.714286)"/>
+ <path transform="translate(30.3214, -0.714286)" d="M 345.00001 536.11218 A 3.0357144 3.0357144 0 1 1 338.92858,536.11218 A 3.0357144 3.0357144 0 1 1 345.00001 536.11218 z" sodipodi:ry="3.0357144" sodipodi:rx="3.0357144" sodipodi:cy="536.11218" sodipodi:cx="341.96429" id="path3198" style="opacity: 0.977778; fill: rgb(151, 192, 36); fill-opacity: 1; stroke: none; stroke-width: 0.9; stroke-linejoin: miter; stroke-miterlimit: 4; stroke-dasharray: none; stroke-opacity: 0.401316;" sodipodi:type="arc"/>
+ </g>
+ <path sodipodi:type="arc" style="opacity: 0.977778; fill: rgb(255, 255, 255); fill-opacity: 1; stroke: none; stroke-width: 0.9; stroke-linejoin: miter; stroke-miterlimit: 4; stroke-dasharray: none; stroke-opacity: 0.401316;" id="path3224" sodipodi:cx="341.96429" sodipodi:cy="536.11218" sodipodi:rx="3.0357144" sodipodi:ry="3.0357144" d="M 345.00001 536.11218 A 3.0357144 3.0357144 0 1 1 338.92858,536.11218 A 3.0357144 3.0357144 0 1 1 345.00001 536.11218 z" transform="translate(-0.57143, -0.714286)"/>
+ <path transform="translate(30.3214, -0.714286)" d="M 345.00001 536.11218 A 3.0357144 3.0357144 0 1 1 338.92858,536.11218 A 3.0357144 3.0357144 0 1 1 345.00001 536.11218 z" sodipodi:ry="3.0357144" sodipodi:rx="3.0357144" sodipodi:cy="536.11218" sodipodi:cx="341.96429" id="path3226" style="opacity: 0.977778; fill: rgb(255, 255, 255); fill-opacity: 1; stroke: none; stroke-width: 0.9; stroke-linejoin: miter; stroke-miterlimit: 4; stroke-dasharray: none; stroke-opacity: 0.401316;" sodipodi:type="arc"/>
+ </g>
+ </g>
</svg>
View
10 jni/build.bat
@@ -1,6 +1,6 @@
-set shdir=%~dp0
-set "shdir=%shdir:\=/%"
-c:
-cd C:\cygwin\bin
-bash --login -i -c '%shdir%build.sh'
+set shdir=%~dp0
+set "shdir=%shdir:\=/%"
+c:
+cd C:\cygwin\bin
+bash --login -i -c '%shdir%build.sh'
pause
View
28 project.properties
@@ -1,14 +1,14 @@
-# This file is automatically generated by Android Tools.
-# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
-#
-# This file must be checked in Version Control Systems.
-#
-# To customize properties used by the Ant build system use,
-# "ant.properties", and override values to adapt the script to your
-# project structure.
-
-android.library=true
-# Indicates whether an apk should be generated for each density.
-split.density=false
-# Project target.
-target=android-13
+# This file is automatically generated by Android Tools.
+# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
+#
+# This file must be checked in Version Control Systems.
+#
+# To customize properties used by the Ant build system use,
+# "ant.properties", and override values to adapt the script to your
+# project structure.
+
+android.library=true
+# Indicates whether an apk should be generated for each density.
+split.density=false
+# Project target.
+target=android-13
View
320 src/org/anddev/andengine/audio/BaseAudioEntity.java
@@ -1,160 +1,160 @@
-package org.anddev.andengine.audio;
-
-import org.anddev.andengine.audio.exception.AudioException;
-
-/**
- * (c) 2010 Nicolas Gramlich
- * (c) 2011 Zynga Inc.
- *
- * @author Nicolas Gramlich
- * @since 16:35:37 - 13.06.2010
- */
-public abstract class BaseAudioEntity implements IAudioEntity {
- // ===========================================================
- // Constants
- // ===========================================================
-
- // ===========================================================
- // Fields
- // ===========================================================
-
- private final IAudioManager<? extends IAudioEntity> mAudioManager;
-
- protected float mLeftVolume = 1.0f;
- protected float mRightVolume = 1.0f;
-
- private boolean mReleased;
-
- // ===========================================================
- // Constructors
- // ===========================================================
-
- public BaseAudioEntity(final IAudioManager<? extends IAudioEntity> pAudioManager) {
- this.mAudioManager = pAudioManager;
- }
-
- // ===========================================================
- // Getter & Setter
- // ===========================================================
-
- public boolean isReleased() {
- return this.mReleased;
- }
-
- protected IAudioManager<? extends IAudioEntity> getAudioManager() throws AudioException {
- this.assertNotReleased();
-
- return this.mAudioManager;
- }
-
- public float getActualLeftVolume() throws AudioException {
- this.assertNotReleased();
-
- return this.mLeftVolume * this.getMasterVolume();
- }
-
- public float getActualRightVolume() throws AudioException {
- this.assertNotReleased();
-
- return this.mRightVolume * this.getMasterVolume();
- }
-
- protected float getMasterVolume() throws AudioException {
- this.assertNotReleased();
-
- return this.mAudioManager.getMasterVolume();
- }
-
- // ===========================================================
- // Methods for/from SuperClass/Interfaces
- // ===========================================================
-
- protected abstract void throwOnReleased() throws AudioException ;
-
- @Override
- public float getVolume() throws AudioException {
- this.assertNotReleased();
-
- return (this.mLeftVolume + this.mRightVolume) * 0.5f;
- }
-
- @Override
- public float getLeftVolume() throws AudioException {
- this.assertNotReleased();
-
- return this.mLeftVolume;
- }
-
- @Override
- public float getRightVolume() throws AudioException {
- this.assertNotReleased();
-
- return this.mRightVolume;
- }
-
- @Override
- public final void setVolume(final float pVolume) throws AudioException {
- this.assertNotReleased();
-
- this.setVolume(pVolume, pVolume);
- }
-
- @Override
- public void setVolume(final float pLeftVolume, final float pRightVolume) throws AudioException {
- this.assertNotReleased();
-
- this.mLeftVolume = pLeftVolume;
- this.mRightVolume = pRightVolume;
- }
-
- @Override
- public void onMasterVolumeChanged(final float pMasterVolume) throws AudioException {
- this.assertNotReleased();
- }
-
- @Override
- public void play() throws AudioException {
- this.assertNotReleased();
- }
-
- @Override
- public void pause() throws AudioException {
- this.assertNotReleased();
- }
-
- @Override
- public void resume() throws AudioException {
- this.assertNotReleased();
- }
-
- @Override
- public void stop() throws AudioException {
- this.assertNotReleased();
- }
-
- @Override
- public void setLooping(final boolean pLooping) throws AudioException {
- this.assertNotReleased();
- }
-
- @Override
- public void release() throws AudioException {
- this.assertNotReleased();
-
- this.mReleased = true;
- }
-
- // ===========================================================
- // Methods
- // ===========================================================
-
- protected void assertNotReleased() throws AudioException {
- if(this.mReleased) {
- this.throwOnReleased();
- }
- }
-
- // ===========================================================
- // Inner and Anonymous Classes
- // ===========================================================
-}
+package org.anddev.andengine.audio;
+
+import org.anddev.andengine.audio.exception.AudioException;
+
+/**
+ * (c) 2010 Nicolas Gramlich
+ * (c) 2011 Zynga Inc.
+ *
+ * @author Nicolas Gramlich
+ * @since 16:35:37 - 13.06.2010
+ */
+public abstract class BaseAudioEntity implements IAudioEntity {
+ // ===========================================================
+ // Constants
+ // ===========================================================
+
+ // ===========================================================
+ // Fields
+ // ===========================================================
+
+ private final IAudioManager<? extends IAudioEntity> mAudioManager;
+
+ protected float mLeftVolume = 1.0f;
+ protected float mRightVolume = 1.0f;
+
+ private boolean mReleased;
+
+ // ===========================================================
+ // Constructors
+ // ===========================================================
+
+ public BaseAudioEntity(final IAudioManager<? extends IAudioEntity> pAudioManager) {
+ this.mAudioManager = pAudioManager;
+ }
+
+ // ===========================================================
+ // Getter & Setter
+ // ===========================================================
+
+ public boolean isReleased() {
+ return this.mReleased;
+ }
+
+ protected IAudioManager<? extends IAudioEntity> getAudioManager() throws AudioException {
+ this.assertNotReleased();
+
+ return this.mAudioManager;
+ }
+
+ public float getActualLeftVolume() throws AudioException {
+ this.assertNotReleased();
+
+ return this.mLeftVolume * this.getMasterVolume();
+ }
+
+ public float getActualRightVolume() throws AudioException {
+ this.assertNotReleased();
+
+ return this.mRightVolume * this.getMasterVolume();
+ }
+
+ protected float getMasterVolume() throws AudioException {
+ this.assertNotReleased();
+
+ return this.mAudioManager.getMasterVolume();
+ }
+
+ // ===========================================================
+ // Methods for/from SuperClass/Interfaces
+ // ===========================================================
+
+ protected abstract void throwOnReleased() throws AudioException ;
+
+ @Override
+ public float getVolume() throws AudioException {
+ this.assertNotReleased();
+
+ return (this.mLeftVolume + this.mRightVolume) * 0.5f;
+ }
+
+ @Override
+ public float getLeftVolume() throws AudioException {
+ this.assertNotReleased();
+
+ return this.mLeftVolume;
+ }
+
+ @Override
+ public float getRightVolume() throws AudioException {
+ this.assertNotReleased();
+
+ return this.mRightVolume;
+ }
+
+ @Override
+ public final void setVolume(final float pVolume) throws AudioException {
+ this.assertNotReleased();
+
+ this.setVolume(pVolume, pVolume);
+ }
+
+ @Override
+ public void setVolume(final float pLeftVolume, final float pRightVolume) throws AudioException {
+ this.assertNotReleased();
+
+ this.mLeftVolume = pLeftVolume;
+ this.mRightVolume = pRightVolume;
+ }
+
+ @Override
+ public void onMasterVolumeChanged(final float pMasterVolume) throws AudioException {
+ this.assertNotReleased();
+ }
+
+ @Override
+ public void play() throws AudioException {
+ this.assertNotReleased();
+ }
+
+ @Override
+ public void pause() throws AudioException {
+ this.assertNotReleased();
+ }
+
+ @Override
+ public void resume() throws AudioException {
+ this.assertNotReleased();
+ }
+
+ @Override
+ public void stop() throws AudioException {
+ this.assertNotReleased();
+ }
+
+ @Override
+ public void setLooping(final boolean pLooping) throws AudioException {
+ this.assertNotReleased();
+ }
+
+ @Override
+ public void release() throws AudioException {
+ this.assertNotReleased();
+
+ this.mReleased = true;
+ }
+
+ // ===========================================================
+ // Methods
+ // ===========================================================
+
+ protected void assertNotReleased() throws AudioException {
+ if(this.mReleased) {
+ this.throwOnReleased();
+ }
+ }
+
+ // ===========================================================
+ // Inner and Anonymous Classes
+ // ===========================================================
+}
View
164 src/org/anddev/andengine/audio/BaseAudioManager.java
@@ -1,82 +1,82 @@
-package org.anddev.andengine.audio;
-
-import java.util.ArrayList;
-
-/**
- * (c) 2010 Nicolas Gramlich
- * (c) 2011 Zynga Inc.
- *
- * @author Nicolas Gramlich
- * @since 18:07:02 - 13.06.2010
- */
-public abstract class BaseAudioManager<T extends IAudioEntity> implements IAudioManager<T> {
- // ===========================================================
- // Constants
- // ===========================================================
-
- // ===========================================================
- // Fields
- // ===========================================================
-
- protected final ArrayList<T> mAudioEntities = new ArrayList<T>();
-
- protected float mMasterVolume = 1.0f;
-
- // ===========================================================
- // Constructors
- // ===========================================================
-
- // ===========================================================
- // Getter & Setter
- // ===========================================================
-
- // ===========================================================
- // Methods for/from SuperClass/Interfaces
- // ===========================================================
-
- @Override
- public float getMasterVolume() {
- return this.mMasterVolume;
- }
-
- @Override
- public void setMasterVolume(final float pMasterVolume) {
- this.mMasterVolume = pMasterVolume;
-
- final ArrayList<T> audioEntities = this.mAudioEntities;
- for(int i = audioEntities.size() - 1; i >= 0; i--) {
- final T audioEntity = audioEntities.get(i);
-
- audioEntity.onMasterVolumeChanged(pMasterVolume);
- }
- }
-
- @Override
- public void add(final T pAudioEntity) {
- this.mAudioEntities.add(pAudioEntity);
- }
-
- @Override
- public boolean remove(final T pAudioEntity) {
- return this.mAudioEntities.remove(pAudioEntity);
- }
-
- @Override
- public void releaseAll() {
- final ArrayList<T> audioEntities = this.mAudioEntities;
- for(int i = audioEntities.size() - 1; i >= 0; i--) {
- final T audioEntity = audioEntities.get(i);
-
- audioEntity.stop();
- audioEntity.release();
- }
- }
-
- // ===========================================================
- // Methods
- // ===========================================================
-
- // ===========================================================
- // Inner and Anonymous Classes
- // ===========================================================
-}
+package org.anddev.andengine.audio;
+
+import java.util.ArrayList;
+
+/**
+ * (c) 2010 Nicolas Gramlich
+ * (c) 2011 Zynga Inc.
+ *
+ * @author Nicolas Gramlich
+ * @since 18:07:02 - 13.06.2010
+ */
+public abstract class BaseAudioManager<T extends IAudioEntity> implements IAudioManager<T> {
+ // ===========================================================
+ // Constants
+ // ===========================================================
+
+ // ===========================================================
+ // Fields
+ // ===========================================================
+
+ protected final ArrayList<T> mAudioEntities = new ArrayList<T>();
+
+ protected float mMasterVolume = 1.0f;
+
+ // ===========================================================
+ // Constructors
+ // ===========================================================
+
+ // ===========================================================
+ // Getter & Setter
+ // ===========================================================
+
+ // ===========================================================
+ // Methods for/from SuperClass/Interfaces
+ // ===========================================================
+
+ @Override
+ public float getMasterVolume() {
+ return this.mMasterVolume;
+ }
+
+ @Override
+ public void setMasterVolume(final float pMasterVolume) {
+ this.mMasterVolume = pMasterVolume;
+
+ final ArrayList<T> audioEntities = this.mAudioEntities;
+ for(int i = audioEntities.size() - 1; i >= 0; i--) {
+ final T audioEntity = audioEntities.get(i);
+
+ audioEntity.onMasterVolumeChanged(pMasterVolume);
+ }
+ }
+
+ @Override
+ public void add(final T pAudioEntity) {
+ this.mAudioEntities.add(pAudioEntity);
+ }
+
+ @Override
+ public boolean remove(final T pAudioEntity) {
+ return this.mAudioEntities.remove(pAudioEntity);
+ }
+
+ @Override
+ public void releaseAll() {
+ final ArrayList<T> audioEntities = this.mAudioEntities;
+ for(int i = audioEntities.size() - 1; i >= 0; i--) {
+ final T audioEntity = audioEntities.get(i);
+
+ audioEntity.stop();
+ audioEntity.release();
+ }
+ }
+
+ // ===========================================================
+ // Methods
+ // ===========================================================
+
+ // ===========================================================
+ // Inner and Anonymous Classes
+ // ===========================================================
+}
View
72 src/org/anddev/andengine/audio/IAudioEntity.java
@@ -1,36 +1,36 @@
-package org.anddev.andengine.audio;
-
-/**
- * (c) 2010 Nicolas Gramlich
- * (c) 2011 Zynga Inc.
- *
- * @author Nicolas Gramlich
- * @since 14:53:29 - 13.06.2010
- */
-public interface IAudioEntity {
- // ===========================================================
- // Constants
- // ===========================================================
-
- // ===========================================================
- // Methods
- // ===========================================================
-
- public void play();
- public void pause();
- public void resume();
- public void stop();
-
- public float getVolume();
- public void setVolume(final float pVolume);
-
- public float getLeftVolume();
- public float getRightVolume();
- public void setVolume(final float pLeftVolume, final float pRightVolume);
-
- public void onMasterVolumeChanged(final float pMasterVolume);
-
- public void setLooping(final boolean pLooping);
-
- public void release();
-}
+package org.anddev.andengine.audio;
+
+/**
+ * (c) 2010 Nicolas Gramlich
+ * (c) 2011 Zynga Inc.
+ *
+ * @author Nicolas Gramlich
+ * @since 14:53:29 - 13.06.2010
+ */
+public interface IAudioEntity {
+ // ===========================================================
+ // Constants
+ // ===========================================================
+
+ // ===========================================================
+ // Methods
+ // ===========================================================
+
+ public void play();
+ public void pause();
+ public void resume();
+ public void stop();
+
+ public float getVolume();
+ public void setVolume(final float pVolume);
+
+ public float getLeftVolume();
+ public float getRightVolume();
+ public void setVolume(final float pLeftVolume, final float pRightVolume);
+
+ public void onMasterVolumeChanged(final float pMasterVolume);
+
+ public void setLooping(final boolean pLooping);
+
+ public void release();
+}
View
52 src/org/anddev/andengine/audio/IAudioManager.java
@@ -1,26 +1,26 @@
-package org.anddev.andengine.audio;
-
-/**
- * (c) 2010 Nicolas Gramlich
- * (c) 2011 Zynga Inc.
- *
- * @author Nicolas Gramlich
- * @since 15:02:06 - 13.06.2010
- */
-public interface IAudioManager<T extends IAudioEntity> {
- // ===========================================================
- // Constants
- // ===========================================================
-
- // ===========================================================
- // Methods
- // ===========================================================
-
- public float getMasterVolume();
- public void setMasterVolume(final float pMasterVolume);
-
- public void add(final T pAudioEntity);
- public boolean remove(final T pAudioEntity);
-
- public void releaseAll();
-}
+package org.anddev.andengine.audio;
+
+/**
+ * (c) 2010 Nicolas Gramlich
+ * (c) 2011 Zynga Inc.
+ *
+ * @author Nicolas Gramlich
+ * @since 15:02:06 - 13.06.2010
+ */
+public interface IAudioManager<T extends IAudioEntity> {
+ // ===========================================================
+ // Constants
+ // ===========================================================
+
+ // ===========================================================
+ // Methods
+ // ===========================================================
+
+ public float getMasterVolume();
+ public void setMasterVolume(final float pMasterVolume);
+
+ public void add(final T pAudioEntity);
+ public boolean remove(final T pAudioEntity);
+
+ public void releaseAll();
+}
View
114 src/org/anddev/andengine/audio/exception/AudioException.java
@@ -1,57 +1,57 @@
-package org.anddev.andengine.audio.exception;
-
-import org.anddev.andengine.util.exception.AndEngineException;
-
-/**
- * (c) Zynga 2011
- *
- * @author Nicolas Gramlich <ngramlich@zynga.com>
- * @since 20:44:53 - 09.11.2011
- */
-public class AudioException extends AndEngineException {
- // ===========================================================
- // Constants
- // ===========================================================
-
- private static final long serialVersionUID = 2647561236520151571L;
-
- // ===========================================================
- // Fields
- // ===========================================================
-
- // ===========================================================
- // Constructors
- // ===========================================================
-
- public AudioException() {
- super();
- }
-
- public AudioException(final String pMessage) {
- super(pMessage);
- }
-
- public AudioException(final Throwable pThrowable) {
- super(pThrowable);
- }
-
- public AudioException(final String pMessage, final Throwable pThrowable) {
- super(pMessage, pThrowable);
- }
-
- // ===========================================================
- // Getter & Setter
- // ===========================================================
-
- // ===========================================================
- // Methods for/from SuperClass/Interfaces
- // ===========================================================
-
- // ===========================================================
- // Methods
- // ===========================================================
-
- // ===========================================================
- // Inner and Anonymous Classes
- // ===========================================================
-}
+package org.anddev.andengine.audio.exception;
+
+import org.anddev.andengine.util.exception.AndEngineException;
+
+/**
+ * (c) Zynga 2011
+ *
+ * @author Nicolas Gramlich <ngramlich@zynga.com>
+ * @since 20:44:53 - 09.11.2011
+ */
+public class AudioException extends AndEngineException {
+ // ===========================================================
+ // Constants
+ // ===========================================================
+
+ private static final long serialVersionUID = 2647561236520151571L;
+
+ // ===========================================================
+ // Fields
+ // ===========================================================
+
+ // ===========================================================
+ // Constructors
+ // ===========================================================
+
+ public AudioException() {
+ super();
+ }
+
+ public AudioException(final String pMessage) {
+ super(pMessage);
+ }
+
+ public AudioException(final Throwable pThrowable) {
+ super(pThrowable);
+ }
+
+ public AudioException(final String pMessage, final Throwable pThrowable) {
+ super(pMessage, pThrowable);
+ }
+
+ // ===========================================================
+ // Getter & Setter
+ // ===========================================================
+
+ // ===========================================================
+ // Methods for/from SuperClass/Interfaces
+ // ===========================================================
+
+ // ===========================================================
+ // Methods
+ // ===========================================================
+
+ // ===========================================================
+ // Inner and Anonymous Classes
+ // ===========================================================
+}
View
298 src/org/anddev/andengine/audio/music/Music.java
@@ -1,149 +1,149 @@
-package org.anddev.andengine.audio.music;
-
-import org.anddev.andengine.audio.BaseAudioEntity;
-import org.anddev.andengine.audio.music.exception.MusicReleasedException;
-
-import android.media.MediaPlayer;
-import android.media.MediaPlayer.OnCompletionListener;
-
-/**
- * (c) 2010 Nicolas Gramlich
- * (c) 2011 Zynga Inc.
- *
- * @author Nicolas Gramlich
- * @since 14:53:12 - 13.06.2010
- */
-public class Music extends BaseAudioEntity {
- // ===========================================================
- // Constants
- // ===========================================================
-
- // ===========================================================
- // Fields
- // ===========================================================
-
- private MediaPlayer mMediaPlayer;
-
- // ===========================================================
- // Constructors
- // ===========================================================
-
- Music(final MusicManager pMusicManager, final MediaPlayer pMediaPlayer) {
- super(pMusicManager);
-
- this.mMediaPlayer = pMediaPlayer;
- }
-
- // ===========================================================
- // Getter & Setter
- // ===========================================================
-
- public boolean isPlaying() throws MusicReleasedException {
- this.assertNotReleased();
-
- return this.mMediaPlayer.isPlaying();
- }
-
- public MediaPlayer getMediaPlayer() throws MusicReleasedException {
- this.assertNotReleased();
-
- return this.mMediaPlayer;
- }
-
- // ===========================================================
- // Methods for/from SuperClass/Interfaces
- // ===========================================================
-
- @Override
- protected MusicManager getAudioManager() throws MusicReleasedException {
- return (MusicManager)super.getAudioManager();
- }
-
- @Override
- protected void throwOnReleased() throws MusicReleasedException {
- throw new MusicReleasedException();
- }
-
- @Override
- public void play() throws MusicReleasedException {
- super.play();
-
- this.mMediaPlayer.start();
- }
-
- @Override
- public void stop() throws MusicReleasedException {
- super.stop();
-
- this.mMediaPlayer.stop();
- }
-
- @Override
- public void resume() throws MusicReleasedException {
- super.resume();
-
- this.mMediaPlayer.start();
- }
-
- @Override
- public void pause() throws MusicReleasedException {
- super.pause();
-
- this.mMediaPlayer.pause();
- }
-
- @Override
- public void setLooping(final boolean pLooping) throws MusicReleasedException {
- super.setLooping(pLooping);
-
- this.mMediaPlayer.setLooping(pLooping);
- }
-
- @Override
- public void setVolume(final float pLeftVolume, final float pRightVolume) throws MusicReleasedException {
- super.setVolume(pLeftVolume, pRightVolume);
-
- final float masterVolume = this.getAudioManager().getMasterVolume();
- final float actualLeftVolume = pLeftVolume * masterVolume;
- final float actualRightVolume = pRightVolume * masterVolume;
-
- this.mMediaPlayer.setVolume(actualLeftVolume, actualRightVolume);
- }
-
- @Override
- public void onMasterVolumeChanged(final float pMasterVolume) throws MusicReleasedException {
- this.setVolume(this.mLeftVolume, this.mRightVolume);
- }
-
- @Override
- public void release() throws MusicReleasedException {
- this.assertNotReleased();
-
- this.mMediaPlayer.release();
- this.mMediaPlayer = null;
-
- this.getAudioManager().remove(this);
-
- super.release();
- }
-
- // ===========================================================
- // Methods
- // ===========================================================
-
- public void seekTo(final int pMilliseconds) throws MusicReleasedException {
- this.assertNotReleased();
-
- this.mMediaPlayer.seekTo(pMilliseconds);
- }
-
- public void setOnCompletionListener(final OnCompletionListener pOnCompletionListener) throws MusicReleasedException {
- this.assertNotReleased();
-
- this.mMediaPlayer.setOnCompletionListener(pOnCompletionListener);
- }
-
- // ===========================================================
- // Inner and Anonymous Classes
- // ===========================================================
-}
+package org.anddev.andengine.audio.music;
+
+import org.anddev.andengine.audio.BaseAudioEntity;
+import org.anddev.andengine.audio.music.exception.MusicReleasedException;
+
+import android.media.MediaPlayer;
+import android.media.MediaPlayer.OnCompletionListener;
+
+/**
+ * (c) 2010 Nicolas Gramlich
+ * (c) 2011 Zynga Inc.
+ *
+ * @author Nicolas Gramlich
+ * @since 14:53:12 - 13.06.2010
+ */
+public class Music extends BaseAudioEntity {
+ // ===========================================================
+ // Constants
+ // ===========================================================
+
+ // ===========================================================
+ // Fields
+ // ===========================================================
+
+ private MediaPlayer mMediaPlayer;
+
+ // ===========================================================
+ // Constructors
+ // ===========================================================
+
+ Music(final MusicManager pMusicManager, final MediaPlayer pMediaPlayer) {
+ super(pMusicManager);
+
+ this.mMediaPlayer = pMediaPlayer;
+ }
+
+ // ===========================================================
+ // Getter & Setter
+ // ===========================================================
+
+ public boolean isPlaying() throws MusicReleasedException {
+ this.assertNotReleased();
+
+ return this.mMediaPlayer.isPlaying();
+ }
+
+ public MediaPlayer getMediaPlayer() throws MusicReleasedException {
+ this.assertNotReleased();
+
+ return this.mMediaPlayer;
+ }
+
+ // ===========================================================
+ // Methods for/from SuperClass/Interfaces
+ // ===========================================================
+
+ @Override
+ protected MusicManager getAudioManager() throws MusicReleasedException {
+ return (MusicManager)super.getAudioManager();
+ }
+
+ @Override
+ protected void throwOnReleased() throws MusicReleasedException {
+ throw new MusicReleasedException();
+ }
+
+ @Override
+ public void play() throws MusicReleasedException {
+ super.play();
+
+ this.mMediaPlayer.start();
+ }
+
+ @Override
+ public void stop() throws MusicReleasedException {
+ super.stop();
+
+ this.mMediaPlayer.stop();
+ }
+
+ @Override
+ public void resume() throws MusicReleasedException {
+ super.resume();
+
+ this.mMediaPlayer.start();
+ }
+
+ @Override
+ public void pause() throws MusicReleasedException {
+ super.pause();
+
+ this.mMediaPlayer.pause();
+ }
+
+ @Override
+ public void setLooping(final boolean pLooping) throws MusicReleasedException {
+ super.setLooping(pLooping);
+
+ this.mMediaPlayer.setLooping(pLooping);
+ }
+
+ @Override
+ public void setVolume(final float pLeftVolume, final float pRightVolume) throws MusicReleasedException {
+ super.setVolume(pLeftVolume, pRightVolume);
+
+ final float masterVolume = this.getAudioManager().getMasterVolume();
+ final float actualLeftVolume = pLeftVolume * masterVolume;
+ final float actualRightVolume = pRightVolume * masterVolume;
+
+ this.mMediaPlayer.setVolume(actualLeftVolume, actualRightVolume);
+ }
+
+ @Override
+ public void onMasterVolumeChanged(final float pMasterVolume) throws MusicReleasedException {
+ this.setVolume(this.mLeftVolume, this.mRightVolume);
+ }
+
+ @Override
+ public void release() throws MusicReleasedException {
+ this.assertNotReleased();
+
+ this.mMediaPlayer.release();
+ this.mMediaPlayer = null;
+
+ this.getAudioManager().remove(this);
+
+ super.release();
+ }
+
+ // ===========================================================
+ // Methods
+ // ===========================================================
+
+ public void seekTo(final int pMilliseconds) throws MusicReleasedException {
+ this.assertNotReleased();
+
+ this.mMediaPlayer.seekTo(pMilliseconds);
+ }
+
+ public void setOnCompletionListener(final OnCompletionListener pOnCompletionListener) throws MusicReleasedException {
+ this.assertNotReleased();
+
+ this.mMediaPlayer.setOnCompletionListener(pOnCompletionListener);
+ }
+
+ // ===========================================================
+ // Inner and Anonymous Classes
+ // ===========================================================
+}
View
220 src/org/anddev/andengine/audio/music/MusicFactory.java
@@ -1,110 +1,110 @@
-package org.anddev.andengine.audio.music;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-
-import android.content.Context;
-import android.content.res.AssetFileDescriptor;
-import android.media.MediaPlayer;
-
-/**
- * (c) 2010 Nicolas Gramlich
- * (c) 2011 Zynga Inc.
- *
- * @author Nicolas Gramlich
- * @since 15:05:49 - 13.06.2010
- */
-public class MusicFactory {
- // ===========================================================
- // Constants
- // ===========================================================
-
- // ===========================================================
- // Fields
- // ===========================================================
-
- private static String sAssetBasePath = "";
-
- // ===========================================================
- // Constructors
- // ===========================================================
-
- // ===========================================================
- // Getter & Setter
- // ===========================================================
-
- /**
- * @param pAssetBasePath must end with '<code>/</code>' or have <code>.length() == 0</code>.
- */
- public static void setAssetBasePath(final String pAssetBasePath) {
- if(pAssetBasePath.endsWith("/") || pAssetBasePath.length() == 0) {
- MusicFactory.sAssetBasePath = pAssetBasePath;
- } else {
- throw new IllegalStateException("pAssetBasePath must end with '/' or be lenght zero.");
- }
- }
-
- public static void onCreate() {
- MusicFactory.setAssetBasePath("");
- }
-
- // ===========================================================
- // Methods for/from SuperClass/Interfaces
- // ===========================================================
-
- // ===========================================================
- // Methods
- // ===========================================================
-
- public static Music createMusicFromFile(final MusicManager pMusicManager, final File pFile) throws IOException {
- final MediaPlayer mediaPlayer = new MediaPlayer();
-
- mediaPlayer.setDataSource(new FileInputStream(pFile).getFD());
- mediaPlayer.prepare();
-
- final Music music = new Music(pMusicManager, mediaPlayer);
- pMusicManager.add(music);
-
- return music;
- }
-
- public static Music createMusicFromAsset(final MusicManager pMusicManager, final Context pContext, final String pAssetPath) throws IOException {
- final MediaPlayer mediaPlayer = new MediaPlayer();
-
- final AssetFileDescriptor assetFileDescritor = pContext.getAssets().openFd(MusicFactory.sAssetBasePath + pAssetPath);
- mediaPlayer.setDataSource(assetFileDescritor.getFileDescriptor(), assetFileDescritor.getStartOffset(), assetFileDescritor.getLength());
- mediaPlayer.prepare();
-
- final Music music = new Music(pMusicManager, mediaPlayer);
- pMusicManager.add(music);
-
- return music;
- }
-
- public static Music createMusicFromResource(final MusicManager pMusicManager, final Context pContext, final int pMusicResID) throws IOException {
- final MediaPlayer mediaPlayer = MediaPlayer.create(pContext, pMusicResID);
- mediaPlayer.prepare();
-
- final Music music = new Music(pMusicManager, mediaPlayer);
- pMusicManager.add(music);
-
- return music;
- }
-
- public static Music createMusicFromAssetFileDescriptor(final MusicManager pMusicManager, final AssetFileDescriptor pAssetFileDescriptor) throws IOException {
- final MediaPlayer mediaPlayer = new MediaPlayer();
-
- mediaPlayer.setDataSource(pAssetFileDescriptor.getFileDescriptor(), pAssetFileDescriptor.getStartOffset(), pAssetFileDescriptor.getLength());
- mediaPlayer.prepare();
-
- final Music music = new Music(pMusicManager, mediaPlayer);
- pMusicManager.add(music);
-
- return music;
- }
-
- // ===========================================================
- // Inner and Anonymous Classes
- // ===========================================================
-}
+package org.anddev.andengine.audio.music;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+
+import android.content.Context;
+import android.content.res.AssetFileDescriptor;
+import android.media.MediaPlayer;
+
+/**
+ * (c) 2010 Nicolas Gramlich
+ * (c) 2011 Zynga Inc.
+ *
+ * @author Nicolas Gramlich
+ * @since 15:05:49 - 13.06.2010
+ */
+public class MusicFactory {
+ // ===========================================================
+ // Constants
+ // ===========================================================
+
+ // ===========================================================
+ // Fields
+ // ===========================================================
+
+ private static String sAssetBasePath = "";
+
+ // ===========================================================
+ // Constructors
+ // ===========================================================
+
+ // ===========================================================
+ // Getter & Setter
+ // ===========================================================
+
+ /**
+ * @param pAssetBasePath must end with '<code>/</code>' or have <code>.length() == 0</code>.
+ */
+ public static void setAssetBasePath(final String pAssetBasePath) {
+ if(pAssetBasePath.endsWith("/") || pAssetBasePath.length() == 0) {
+ MusicFactory.sAssetBasePath = pAssetBasePath;
+ } else {
+ throw new IllegalStateException("pAssetBasePath must end with '/' or be lenght zero.");
+ }
+ }
+
+ public static void onCreate() {
+ MusicFactory.setAssetBasePath("");
+ }
+
+ // ===========================================================
+ // Methods for/from SuperClass/Interfaces
+ // ===========================================================
+
+ // ===========================================================
+ // Methods
+ // ===========================================================
+
+ public static Music createMusicFromFile(final MusicManager pMusicManager, final File pFile) throws IOException {
+ final MediaPlayer mediaPlayer = new MediaPlayer();
+
+ mediaPlayer.setDataSource(new FileInputStream(pFile).getFD());
+ mediaPlayer.prepare();
+
+ final Music music = new Music(pMusicManager, mediaPlayer);
+ pMusicManager.add(music);
+
+ return music;
+ }
+
+ public static Music createMusicFromAsset(final MusicManager pMusicManager, final Context pContext, final String pAssetPath) throws IOException {
+ final MediaPlayer mediaPlayer = new MediaPlayer();
+
+ final AssetFileDescriptor assetFileDescritor = pContext.getAssets().openFd(MusicFactory.sAssetBasePath + pAssetPath);
+ mediaPlayer.setDataSource(assetFileDescritor.getFileDescriptor(), assetFileDescritor.getStartOffset(), assetFileDescritor.getLength());
+ mediaPlayer.prepare();
+
+ final Music music = new Music(pMusicManager, mediaPlayer);
+ pMusicManager.add(music);
+
+ return music;
+ }
+
+ public static Music createMusicFromResource(final MusicManager pMusicManager, final Context pContext, final int pMusicResID) throws IOException {
+ final MediaPlayer mediaPlayer = MediaPlayer.create(pContext, pMusicResID);
+ mediaPlayer.prepare();
+
+ final Music music = new Music(pMusicManager, mediaPlayer);
+ pMusicManager.add(music);
+
+ return music;
+ }
+
+ public static Music createMusicFromAssetFileDescriptor(final MusicManager pMusicManager, final AssetFileDescriptor pAssetFileDescriptor) throws IOException {
+ final MediaPlayer mediaPlayer = new MediaPlayer();
+
+ mediaPlayer.setDataSource(pAssetFileDescriptor.getFileDescriptor(), pAssetFileDescriptor.getStartOffset(), pAssetFileDescriptor.getLength());
+ mediaPlayer.prepare();
+
+ final Music music = new Music(pMusicManager, mediaPlayer);
+ pMusicManager.add(music);
+
+ return music;
+ }
+
+ // ===========================================================
+ // Inner and Anonymous Classes
+ // ===========================================================
+}
View
78 src/org/anddev/andengine/audio/music/MusicLibrary.java
@@ -1,39 +1,39 @@
-package org.anddev.andengine.audio.music;
-
-import org.anddev.andengine.util.Library;
-
-/**
- * (c) Zynga 2011
- *
- * @author Nicolas Gramlich <ngramlich@zynga.com>
- * @since 20:30:34 - 09.11.2011
- */
-public class MusicLibrary extends Library<Music> {
- // ===========================================================
- // Constants
- // ===========================================================
-
- // ===========================================================
- // Fields
- // ===========================================================
-
- // ===========================================================
- // Constructors
- // ===========================================================
-
- // ===========================================================
- // Getter & Setter
- // ===========================================================
-
- // ===========================================================
- // Methods for/from SuperClass/Interfaces
- // ===========================================================
-
- // ===========================================================
- // Methods
- // ===========================================================
-
- // ===========================================================
- // Inner and Anonymous Classes
- // ===========================================================
-}
+package org.anddev.andengine.audio.music;
+
+import org.anddev.andengine.util.Library;
+
+/**
+ * (c) Zynga 2011
+ *
+ * @author Nicolas Gramlich <ngramlich@zynga.com>
+ * @since 20:30:34 - 09.11.2011
+ */
+public class MusicLibrary extends Library<Music> {
+ // ===========================================================
+ // Constants
+ // ===========================================================
+
+ // ===========================================================
+ // Fields
+ // ===========================================================
+
+ // ===========================================================
+ // Constructors
+ // ===========================================================
+
+ // ===========================================================
+ // Getter & Setter
+ // ===========================================================
+
+ // ===========================================================
+ // Methods for/from SuperClass/Interfaces
+ // ===========================================================
+
+ // ===========================================================
+ // Methods
+ // ===========================================================
+
+ // ===========================================================
+ // Inner and Anonymous Classes
+ // ===========================================================
+}
View
88 src/org/anddev/andengine/audio/music/MusicManager.java
@@ -1,44 +1,44 @@
-package org.anddev.andengine.audio.music;
-
-import org.anddev.andengine.audio.BaseAudioManager;
-
-/**
- * (c) 2010 Nicolas Gramlich
- * (c) 2011 Zynga Inc.
- *
- * @author Nicolas Gramlich
- * @since 15:01:23 - 13.06.2010
- */
-public class MusicManager extends BaseAudioManager<Music> {
- // ===========================================================
- // Constants
- // ===========================================================
-
- // ===========================================================
- // Fields
- // ===========================================================
-
- // ===========================================================
- // Constructors
- // ===========================================================
-
- public MusicManager() {
-
- }
-
- // ===========================================================
- // Getter & Setter
- // ===========================================================
-
- // ===========================================================
- // Methods for/from SuperClass/Interfaces
- // ===========================================================
-
- // ===========================================================
- // Methods
- // ===========================================================
-
- // ===========================================================
- // Inner and Anonymous Classes
- // ===========================================================
-}
+package org.anddev.andengine.audio.music;
+
+import org.anddev.andengine.audio.BaseAudioManager;
+
+/**
+ * (c) 2010 Nicolas Gramlich
+ * (c) 2011 Zynga Inc.
+ *
+ * @author Nicolas Gramlich
+ * @since 15:01:23 - 13.06.2010
+ */
+public class MusicManager extends BaseAudioManager<Music> {
+ // ===========================================================
+ // Constants
+ // ===========================================================
+
+ // ===========================================================
+ // Fields
+ // ===========================================================
+
+ // ===========================================================
+ // Constructors
+ // ===========================================================
+
+ public MusicManager() {
+
+ }
+
+ // ===========================================================
+ // Getter & Setter
+ // ===========================================================
+
+ // ===========================================================
+ // Methods for/from SuperClass/Interfaces
+ // ===========================================================
+
+ // ===========================================================
+ // Methods
+ // ===========================================================
+
+ // ===========================================================
+ // Inner and Anonymous Classes
+ // ===========================================================
+}
View
114 src/org/anddev/andengine/audio/music/exception/MusicException.java
@@ -1,57 +1,57 @@
-package org.anddev.andengine.audio.music.exception;
-
-import org.anddev.andengine.util.exception.AndEngineException;
-
-/**
- * (c) Zynga 2011
- *
- * @author Nicolas Gramlich <ngramlich@zynga.com>
- * @since 20:37:53 - 09.11.2011
- */
-public class MusicException extends AndEngineException {
- // ===========================================================
- // Constants
- // ===========================================================
-
- private static final long serialVersionUID = -3314204068618256639L;
-
- // ===========================================================
- // Fields
- // ===========================================================
-
- // ===========================================================
- // Constructors
- // ===========================================================
-
- public MusicException() {
- super();
- }
-
- public MusicException(final String pMessage) {
- super(pMessage);
- }
-
- public MusicException(final Throwable pThrowable) {
- super(pThrowable);
- }
-
- public MusicException(final String pMessage, final Throwable pThrowable) {
- super(pMessage, pThrowable);
- }
-
- // ===========================================================
- // Getter & Setter
- // ===========================================================
-
- // ===========================================================
- // Methods for/from SuperClass/Interfaces
- // ===========================================================
-
- // ===========================================================
- // Methods
- // ===========================================================
-
- // ===========================================================
- // Inner and Anonymous Classes
- // ===========================================================
-}
+package org.anddev.andengine.audio.music.exception;
+
+import org.anddev.andengine.util.exception.AndEngineException;
+
+/**
+ * (c) Zynga 2011
+ *
+ * @author Nicolas Gramlich <ngramlich@zynga.com>
+ * @since 20:37:53 - 09.11.2011
+ */
+public class MusicException extends AndEngineException {
+ // ===========================================================
+ // Constants
+ // ===========================================================
+
+ private static final long serialVersionUID = -3314204068618256639L;
+
+ // ===========================================================
+ // Fields
+ // ===========================================================
+
+ // ===========================================================
+ // Constructors
+ // ===========================================================
+
+ public MusicException() {
+ super();
+ }
+
+ public MusicException(final String pMessage) {
+ super(pMessage);
+ }
+
+ public MusicException(final Throwable pThrowable) {
+ super(pThrowable);
+ }
+
+ public MusicException(final String pMessage, final Throwable pThrowable) {
+ super(pMessage, pThrowable);
+ }
+
+ // ===========================================================
+ // Getter & Setter
+ // ===========================================================
+
+ // ===========================================================
+ // Methods for/from SuperClass/Interfaces
+ // ===========================================================
+
+ // ===========================================================
+ // Methods
+ // ===========================================================
+
+ // ===========================================================
+ // Inner and Anonymous Classes
+ // ===========================================================
+}
View
78 src/org/anddev/andengine/audio/music/exception/MusicReleasedException.java
@@ -1,39 +1,39 @@
-package org.anddev.andengine.audio.music.exception;
-
-/**
- * (c) Zynga 2011
- *
- * @author Nicolas Gramlich <ngramlich@zynga.com>
- * @since 20:44:27 - 09.11.2011
- */
-public class MusicReleasedException extends MusicException {
- // ===========================================================
- // Constants
- // ===========================================================
-
- private static final long serialVersionUID = 8284741766961042604L;
-
- // ===========================================================
- // Fields
- // ===========================================================
-
- // ===========================================================
- // Constructors
- // ===========================================================
-
- // ===========================================================
- // Getter & Setter
- // ===========================================================
-
- // ===========================================================
- // Methods for/from SuperClass/Interfaces
- // ===========================================================
-
- // ===========================================================
- // Methods
- // ===========================================================
-
- // ===========================================================
- // Inner and Anonymous Classes
- // ===========================================================
-}
+package org.anddev.andengine.audio.music.exception;
+
+/**
+ * (c) Zynga 2011
+ *
+ * @author Nicolas Gramlich <ngramlich@zynga.com>
+ * @since 20:44:27 - 09.11.2011
+ */
+public class MusicReleasedException extends MusicException {
+ // ===========================================================
+ // Constants
+ // ===========================================================
+
+ private static final long serialVersionUID = 8284741766961042604L;
+
+ // ===========================================================
+ // Fields
+ // ===========================================================
+
+ // ===========================================================
+ // Constructors
+ // ===========================================================
+
+ // ===========================================================
+ // Getter & Setter
+ // ===========================================================
+
+ // ===========================================================
+ // Methods for/from SuperClass/Interfaces
+ // ===========================================================
+
+ // ===========================================================
+ // Methods
+ // ===========================================================
+
+ // ===========================================================
+ // Inner and Anonymous Classes
+ // ===========================================================
+}
View
328 src/org/anddev/andengine/audio/sound/Sound.java
@@ -1,164 +1,164 @@
-package org.anddev.andengine.audio.sound;
-
-import org.anddev.andengine.audio.BaseAudioEntity;
-import org.anddev.andengine.audio.sound.exception.SoundReleasedException;
-
-import android.media.SoundPool;
-
-/**
- * (c) 2010 Nicolas Gramlich
- * (c) 2011 Zynga Inc.
- *
- * @author Nicolas Gramlich
- * @since 13:22:15 - 11.03.2010
- */
-public class Sound extends BaseAudioEntity {
- // ===========================================================
- // Constants
- // ===========================================================
-
- // ===========================================================
- // Fields
- // ===========================================================
-
- private int mSoundID;
- private int mStreamID;
-
- private int mLoopCount;
- private float mRate = 1.0f;
-
- // ===========================================================
- // Constructors
- // ===========================================================
-
- Sound(final SoundManager pSoundManager, final int pSoundID) {
- super(pSoundManager);
-
- this.mSoundID = pSoundID;
- }
-
- // ===========================================================
- // Getter & Setter
- // ===========================================================
-
- public void setLoopCount(final int pLoopCount) throws SoundReleasedException {
- this.assertNotReleased();
-
- this.mLoopCount = pLoopCount;
- if(this.mStreamID != 0) {
- this.getSoundPool().setLoop(this.mStreamID, pLoopCount);
- }
- }
-
- public void setRate(final float pRate) throws SoundReleasedException {
- this.assertNotReleased();
-
- this.mRate = pRate;
- if(this.mStreamID != 0) {
- this.getSoundPool().setRate(this.mStreamID, pRate);
- }
- }
-
- private SoundPool getSoundPool() throws SoundReleasedException {
- return this.getAudioManager().getSoundPool();
- }
-
- // ===========================================================
- // Methods for/from SuperClass/Interfaces
- // ===========================================================
-
- @Override
- protected SoundManager getAudioManager() throws SoundReleasedException {
- return (SoundManager)super.getAudioManager();
- }
-
- @Override
- protected void throwOnReleased() throws SoundReleasedException {
- throw new SoundReleasedException();
- }
-
- @Override
- public void play() throws SoundReleasedException {
- super.play();
-
- final float masterVolume = this.getMasterVolume();
- final float leftVolume = this.mLeftVolume * masterVolume;
- final float rightVolume = this.mRightVolume * masterVolume;
-
- this.mStreamID = this.getSoundPool().play(this.mSoundID, leftVolume, rightVolume, 1, this.mLoopCount, this.mRate);
- }
-
- @Override
- public void stop() throws SoundReleasedException {
- super.stop();
-
- if(this.mStreamID != 0) {
- this.getSoundPool().stop(this.mStreamID);
- }
- }
-
- @Override
- public void resume() throws SoundReleasedException {
- super.resume();
-
- if(this.mStreamID != 0) {
- this.getSoundPool().resume(this.mStreamID);
- }
- }
-
- @Override
- public void pause() throws SoundReleasedException {
- super.pause();
-
- if(this.mStreamID != 0) {
- this.getSoundPool().pause(this.mStreamID);
- }
- }
-
- @Override
- public void release() throws SoundReleasedException {
- this.assertNotReleased();
-
- this.getSoundPool().unload(this.mSoundID);
- this.mSoundID = 0;
-
- this.getAudioManager().remove(this);
-
- super.release();
- }
-
- @Override
- public void setLooping(final boolean pLooping) throws SoundReleasedException {
- super.setLooping(pLooping);
-
- this.setLoopCount((pLooping) ? -1 : 0);
- }
-
- @Override
- public void setVolume(final float pLeftVolume, final float pRightVolume) throws SoundReleasedException {