Method for obtaining Cocos2d-x game playing sound in real time

A real-time acquisition and game technology, applied in the direction of sound input/output, etc., can solve the problems of destroying the integrity of Cocos2d-x, the inability to obtain audio data frames in real time, and the inability to guarantee universality, so as to achieve easy upgrade and maintenance, and universality And ease of use, the effect of ensuring stability

Inactive Publication Date: 2015-07-22
SOUTHWEST UNIVERSITY FOR NATIONALITIES
View PDF6 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The implementation of this method cannot guarantee universality. It may have a destructive effect on normal playback data and may destroy the integrity of Cocos2d-x. In addition, it can only be used for a single application and is difficult to port
[0007] A common disadvantage of the above two traditional methods is that since OpenAL and AVFoundation are the underlying playback bases provided in the form of binary libraries, the sound playback based on them can only realize the basics of playing sound files, pausing playback, and resuming playback. It is impossible to obtain the audio data frame currently being sent to the sound card for playback in real time

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method for obtaining Cocos2d-x game playing sound in real time
  • Method for obtaining Cocos2d-x game playing sound in real time
  • Method for obtaining Cocos2d-x game playing sound in real time

Examples

Experimental program
Comparison scheme
Effect test

Embodiment

[0031] Such as figure 1 , 2 As shown, the present invention exists as an IOS Framework and is provided for game developers to use. When Cocos2d-x game developers use the present invention, they only need to add the implemented Framework to the game project and call the framework provided by the Framework. interface functions. At runtime, the Framework will automatically obtain the sound data of the Cocos2d-x game and provide it to game developers.

[0032] Such as figure 2As shown, the Framework for obtaining sound data mainly includes four modules: OpenAL implementation module; Cocos2d-x scheduler implementation module; module for merging multiple audio data; audio data management module.

[0033] The OpenAL implementation module mainly completes the replacement of the OpenAL library of the IOS system, provides the same functions as the OpenAL library provided by the IOS system, and introduces the call of Cocos2d-x to OpenAL into the OpenAL implemented by itself to obtain...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a method for obtaining Cocos2d-x game playing sound in real time. The game playing sound is obtained by creating a special Framework serving Cocos2d-x game developers. Complete recompilation is carried out in the Framework to achieve an OpenAL base, and a specific callback function is added in the implementation process of the OpenAL base and used for obtaining a currently played audio frame; meanwhile, a callback interface is obtained by introducing a global Cocos2d-x share Director, the callback function is added and used for monitoring each frame of a Cocos2d-x game, and therefore the playing state of the current AVPlayer and the currently played audio frame are obtained. Finally, the multiple paths of obtained original audio frames are combined to obtain a mixed sound frame, and the obtained sound frame is completely consistent with the sound heard by a user playing the game. The method which processes and stores sound in game operation in real time is provided for game developers.

Description

technical field [0001] The present invention relates to a method for acquiring the sound played by a Cocos2d-x game in real time, and specifically refers to a method for automatically acquiring all sound data played by the current game during the running of the game. Background technique [0002] Cocos2d-x is a multi-platform 2D mobile game engine, developed in C++, based on OpenGL ES, based on Cocos2d-iphone, supports WOPhone, iOS 4.1, Android 2.1 and above, WindowsXP&Windows7, WindowsPhone 8. Using the SDK provided by Cocos2d-x can easily build and run mobile games under the IOS platform. [0003] Cocos2d-x provides two sound engines under the IOS platform, which are packaged and implemented based on OpenAL and AVFoundation respectively. The engine based on OpenAL is mainly used to provide real-time sound effect playback, such as the shooting sound in the game, etc.; the sound engine based on AVFoundation is mainly implemented by AVPlayer, and is mainly used to play the b...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F3/16
Inventor 唐东明周伟
Owner SOUTHWEST UNIVERSITY FOR NATIONALITIES
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products