April 2015
Beginner to intermediate
494 pages
10h 26m
English
Let's open and play an MP3 music file with OpenSL ES:
jni/ResourceManager.cpp created in the previous chapters by defining a new structure ResourceDescriptor and appending a new method descriptor():... struct ResourceDescriptor { int32_t mDescriptor; off_t mStart; off_t mLength; }; class Resource { public: ... status open(); void close(); status read(void* pBuffer, size_t pCount); ResourceDescriptor descriptor(); bool operator==(const Resource& pOther); private: ... }; #endif
jni/ResourceManager.cpp. Of course, makes use of the asset manager API to open the descriptor and fill a ResourceDescriptor ...