CN109794063A - A kind of method of audio customized recording and broadcasting - Google Patents

A kind of method of audio customized recording and broadcasting Download PDF

Info

Publication number
CN109794063A
CN109794063A CN201811580267.7A CN201811580267A CN109794063A CN 109794063 A CN109794063 A CN 109794063A CN 201811580267 A CN201811580267 A CN 201811580267A CN 109794063 A CN109794063 A CN 109794063A
Authority
CN
China
Prior art keywords
audio
recording
play
buffer
broadcasting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
CN201811580267.7A
Other languages
Chinese (zh)
Inventor
周军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Snail Digital Technology Co Ltd
Original Assignee
Suzhou Snail Digital Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Snail Digital Technology Co Ltd filed Critical Suzhou Snail Digital Technology Co Ltd
Priority to CN201811580267.7A priority Critical patent/CN109794063A/en
Publication of CN109794063A publication Critical patent/CN109794063A/en
Withdrawn legal-status Critical Current

Links

Abstract

A kind of method of audio customized recording and broadcasting, comprising the following steps: recording access is called to start to record;It will be in audio filling the first recording buffer;When filling up the first recording buffer, automatic the second recording of filling buffer, and trigger recording readjustment;Setting records call back function and disk is written in voice data stream;The first recording buffer is reentered into recording buffering queue;The audio data is read into the first play-out buffer, after filling up and puts it into play buffering queue;Receive the instruction for playing the audio;It extracts the audio data in the first broadcasting buffer and starts to play;Triggering plays readjustment when first play-out buffer finishes playing, and starts to play the audio data in the second play-out buffer;First play-out buffer continues to read the audio data in the disk, and is reentered into play buffering queue.Method of the invention, customized audio can be heard simultaneously by discharging technical ability in scene of game, improve personal experience.

Description

A kind of method of audio customized recording and broadcasting
Technical field
The present invention relates to game engine technical fields, more particularly to a kind of method of audio customized recording and broadcasting.
Background technique
In RPG(Role-playing game) in role playing game, by one or several angles in player's game for play Color, there is complete plot, and the core of role playing game is to play the part of.In game play, player's role is one It is movable in a realistic or virtual world, enable institute's figure develop by some action under a structuring rule.Player Success in this process and the formal system for unsuccessfully depending on a rule or course of action.
In " wild good mind: destiny ", by the excellent perfect deduction of animation original class sound, player is manipulating the personality feature of game role While oneself favorite role, moreover it is possible to which animation sound is excellent known to hearing dubs, and game experiencing is allowed more to substitute into sense.
In this context, in order to more emphasize development of action and personal experience, we increase war on game experiencing Struggle against the customized voice recording function of technical ability audio, and in gaming, card is bound with technical ability, in original card, discharges skill Can have default system from the audio (the excellent recording technical ability audio of sound) set.Player is in game process, if it is desired in release technical ability While can hear the audio oneself matched to technical ability, then different audios can be recorded to different cards at card interface, For shielding harness from setting the excellent audio of sound, customized audio can be heard simultaneously by discharging technical ability in scene of game, not only player from Oneself can hear that nearby player can also hear the customized audio of technical ability in fight.
Summary of the invention
In order to solve the shortcomings of the prior art, the purpose of the present invention is to provide a kind of customized recording of audio and broadcast The method put can hear customized audio while discharging technical ability in scene of game.
To achieve the above object, the method for audio provided by the invention customized recording and broadcasting, comprising:
1) recording access is called to start to record;
It 2) will be in audio filling the first recording buffer;
3) when filling up the first recording buffer, automatic the second recording of filling buffer, and trigger recording readjustment;
4) setting records call back function and disk is written in voice data stream;
5) the first recording buffer is reentered into recording buffering queue;
6) audio data is read into the first play-out buffer, after filling up and puts it into play buffering queue;
7) instruction for playing the audio is received;
8) it extracts the audio data in the first broadcasting buffer and starts to play;
9) triggering plays readjustment when first play-out buffer finishes playing, and starts to play the audio in the second play-out buffer Data;
10) first play-out buffer continues to read the audio data in the disk, and is reentered into play buffering queue.
Further, including, after the completion of audio recording, by audio files storage to audio server, and the sound is returned to The URL character string of frequency file.
Further, including, by the URL character string and object binding is played, institute is downloaded by the URL character string Audio data is stated, and is played out by the broadcasting object.
To achieve the above object, the present invention also provides a kind of computer readable storage mediums, are stored thereon with computer and refer to It enables, the computer instruction executes the method and step of audio as described above customized recording and broadcasting when running.
To achieve the above object, described to deposit the present invention also provides a kind of gaming terminal device, including memory and processor The computer instruction run on the processor is stored on reservoir, the processor executes when running the computer instruction The method and step of audio as described above customized recording and broadcasting.
The method of a kind of audio of the invention customized recording and broadcasting, has the advantages that
1) shielding harness is from the excellent audio of sound is set, and technical ability is discharged in scene of game can hear customized audio simultaneously, not only Player oneself can hear that nearby player can also hear the customized audio of technical ability in fight.
2) it highlights development of action and improves personal experience.
Other features and advantages of the present invention will be illustrated in the following description, also, partly becomes from specification It obtains it is clear that understand through the implementation of the invention.
Detailed description of the invention
Attached drawing is used to provide further understanding of the present invention, and constitutes part of specification, and with it is of the invention Embodiment together, is used to explain the present invention, and is not construed as limiting the invention.In the accompanying drawings:
Fig. 1 is the method flow diagram of audio according to the present invention customized recording and broadcasting;
Fig. 2 is the customized recording of the audio according to the present invention based on ios platform and playback method flow diagram;
Fig. 3 is the customized method for recording step schematic diagram of audio according to the present invention;
Fig. 4 is the customized playback method step schematic diagram of audio according to the present invention;
Fig. 5 is one schematic diagram of embodiment of the method for audio according to the present invention customized recording and broadcasting.
Specific embodiment
Hereinafter, preferred embodiments of the present invention will be described with reference to the accompanying drawings, it should be understood that preferred reality described herein Apply example only for the purpose of illustrating and explaining the present invention and is not intended to limit the present invention.
Fig. 1 is a kind of method flow diagram of audio according to the present invention customized recording and broadcasting, below with reference to Fig. 1, The customized recording of audio of the invention and playback method are described in detail.
Firstly, calling recording access to start to record in step 101.In the step, long-pressing record button starts to record, record Tone SDK interface.
It, will be in audio filling the first recording buffer in step 102.In the step, the audio data of recording is inserted slow Rush first recording buffer in queue.
In step 103, when filling up the first recording buffer, automatic the second recording of filling buffer, and trigger recording readjustment. In the step, when the first recording buffer in queue fills up, next recording buffer can be filled automatically.At this point, can touch Send back to tune.
In step 104, setting records call back function and disk is written in voice data stream.In the step, need to be arranged readjustment Function [A1], is written disk for voice data stream.
In step 105, setting records call back function and the first recording buffer is reentered into recording buffering queue simultaneously Step 103 is repeated, in the step, needs that the buffer is reentered into buffering queue in call back function, to reuse The buffer.
In step 106, the audio data is read into the first play-out buffer, fill up the first play-out buffer and is incited somebody to action First play-out buffer is put into play buffering queue.In the step, audio is read into buffer.Once filling full one A buffer will enter buffer queue, be now in armed state.
In step 107, the instruction for playing the audio is received.In the step, application command issues instruction, it is desirable that Audio queue starts to play.
In step 108, it extracts the audio data in the first broadcasting buffer and starts to play.In the step, sound Frequently can fetch evidence from first broadcasting buffer, and start to play.
In step 109, triggering plays readjustment when first play-out buffer finishes playing, and starts to play the second broadcasting Audio data in buffer.In the step, once finishing playing, readjustment will be triggered, and start to play it is next play it is slow Content in storage.
In step 110, first play-out buffer continues to read the audio data in the disk, and is reentered into Play buffering queue repeats step 108.It needs to take subsequent audio data to the buffer in the step, in readjustment, then weigh Newly it is put into buffer queue.Repeat step 108.
Preferably, after the completion of the audio recording, by the audio files storage to audio server, and audio is returned to URL character string.In the step, recording in game logic with broadcasting is not to carry out simultaneously, if what is played is in fight Network audio, can be since network be bad or other factors, and causing to play has delay, this can make the experience of game have a greatly reduced quality. The audio of recording, there are audio servers in this way, then fight every time into copy, downloading complete audio data to mobile phone disk, The technical ability audio data that can guarantee to fight every time is all real-time.
Preferably, the URL character string and audio object are bound, the audio number is downloaded by the URL character string According to, and played out by the audio object.In the step, the card in character string URL and game can be bound, next time Downloading is played to inquire by the URL character string.When entering copy fight, into copy before card will be bound with troop owner The customized audio of board passes through the locally downloading disk of URL character string, and technical ability is discharged in fight, plays audio.
Preferably, the present invention also provides a kind of computer readable storage mediums, are stored thereon with computer instruction, the meter The method and step of audio as described above customized recording and broadcasting is executed when the instruction operation of calculation machine.
Preferably, it the present invention also provides a kind of gaming terminal device, including memory and processor, is stored up on the memory There is the computer instruction run on the processor, the processor executes when running the computer instruction such as institute above The method and step of the audio stated customized recording and broadcasting.
Embodiment:
In this embodiment, the customized recording of audio of the invention and playback method are introduced by taking iOS platform as an example.
Fig. 2 is the customized recording of the audio according to the present invention based on ios platform and playback method flow diagram, is such as schemed Shown in 2, whole process is substantially to be completed by SDK, and the recording of audio, the broadcasting of audio are mainly completed in SDK, and audio is deposited The download function of storage and audio, the function that the recording of audio mainly uses iOS AVAudio API to encapsulate with broadcasting, under Face parses realization principle.
It to be played in iOS device and recording audio, apple recommends us to use in AVFoundation frame AVAudioPlayer and AVAudioRecorder class.Although usage is fairly simple, streaming is not supported, it means that Before playing audio, it is necessary to after the completion of the load of entire audio, could start to play audio, when recording, it is also necessary to Deng Daolu After sound, recording data can be just got, this just causes significant limitation to application.In order to solve this problem, it just needs It to be played using Audio Queue Services and recording audio, in order to simplify the processing of audio file, there is also the need to Use Adudio File Services.We learn about that the groundwork of AudioQueue Service is former before the use Reason.
Fig. 3 is the customized method for recording step schematic diagram of audio according to the present invention.As shown in figure 3, a Recording Audio Queue, Buffer Queue (buffering queue) and a Callback including Buffer (buffer) composition (readjustment), working principle: input, comprising:
1, audio is inserted in first buffer;
2, when first buffer in queue fills up, next buffer can be filled automatically.At this point, readjustment can be triggered;
3, it needs voice data stream disk is written in call back function;
4, it then, needs that the buffer is reentered into buffering queue in call back function, to reuse the buffer.Weight Multiple step 2.
Fig. 4 is the customized playback method step schematic diagram of audio according to the present invention.As shown in figure 4, its structure and recording Audio queue is almost the same, only adjusts back opportunity difference, and workflow slightly has difference.Playing flow: output, comprising:
1. audio is read into buffer.Once filling a full buffer, buffer queue will be entered, be now in Life state.
2. application command issues instruction, it is desirable that audio queue starts to play.
The evidence 3. audio can fetch from first buffer, and start to play.
4. once finishing playing, readjustment will be triggered, and starts to play the content in next buffer.
5. needing to take subsequent audio data to the buffer in readjustment, then it is reentered into buffer queue.It repeats to walk Rapid 3.
Fig. 5 is one schematic diagram of embodiment of the method for audio according to the present invention customized recording and broadcasting.In game logic Layer, card interface starts to record as shown in figure 5, long-pressing record button
SDK interface is called in recording
virtual bool IO_AudioMsgStartRecord(bool bSenderSidetoText) = 0;// Speech message: start recording increase SenderSidetoText indicate whether sender carry out voice turn text, receiving When evt_audiomsg_recordsucceed, call IO_GetSpeechText () that the text results to take a turn for the better can be got.
Stop recording and call SDK interface:
virtual bool IO_AudioMsgStopRecord(bool bCancel = false, int savetype = save_temp) = 0;// speech message: bCancel=false then uploads recording, bCancel=true then Cancel recording,
Recording logical code:
bool SnailVoiceManager::StartAudioRecord( int channelType,const char* szUserData )
{
if (IsAudioRecording())
{
return false;
}
if (IsAudioPlaying())
{
StopAudioPlay();
}
SnailVoiceRoom* pRoom = GetSnailVoiceRoom(channelType);
if (!pRoom)
{
return false;
}
isnail_audio_client* pAudioClient = pRoom->GetSDKAudoClient();
if (!pAudioClient)
{
return false;
}
m_iRecordingChannel = channelType;
m_iAudioRecordStatus = eAudioRecordStatus_Ing;
// lower user's extension information is updated here, it is not saved in also in the object of sdk, recording success is waited to update sdk again In
if (NULL != szUserData)
{
pRoom->SetUserData(szUserData);
}
//return pAudioClient->IO_AudioMsgStartRecord();
return pAudioClient->IO_AudioMsgStartRecord(true);
}
It records after completing, by audio files storage to audio server, after success, returns to audio URL character string, the character String is bound with card, and next time plays downloading and inquired by the URL character string.When entering copy fight, into copy before by team The customized audio of card is bound with 5 owners passes through the locally downloading disk of URL character string.Technical ability is discharged in fight, is played Audio plays as follows with downloading relevant interface:
virtual bool IO_DownLoadAudioMessage(const char* content) = 0;// disappear Cease locally downloading, do not play, behind IO_AudioMsgStartRecord can be called directly to be played out.
virtual bool IO_AudioMsgStartPlay(const char* content) = 0; // Speech message: starting to play, and content indicates the address speech message URL
virtual void IO_AudioMsgStopPlay() = 0;// speech message: stop playing
Downloading logic is accomplished by
bool SnailVoiceManager::DownLoadAudioMsg(int channelType, const char* content)
{
SnailVoiceRoom* pRoom = GetSnailVoiceRoom(channelType);
if (!pRoom)
{
return false;
}
isnail_audio_client* pAudioClient = pRoom->GetSDKAudioClient();
if (!pAudioClient)
{
return false;
}
return pAudioClient->IO_DownLoadAudioMessage(content);
}
It is as follows to play related realization:
bool SnailVoiceManager::StartAudioPlay( int channelType,const char* content)
{
if (IsAudioPlaying())
{
StopAudioPlay();
}
if (IsAudioRecording()) {
StopAudioRecord(true);
}
isnail_audio_client* pAudioClient = GetSDKAudoClient(channelType);
if (!pAudioClient)
{
return false;
}
m_iPlayingChannel = channelType;
m_iAudioPlayStatus = eAudioPlayStatus_Ing;
return pAudioClient->IO_AudioMsgStartPlay(content);
}
Those of ordinary skill in the art will appreciate that: the foregoing is only a preferred embodiment of the present invention, is not used to limit The system present invention, although the present invention is described in detail referring to the foregoing embodiments, for those skilled in the art, Its technical solution that can still record to foregoing embodiments is modified, or is equal to part of technical characteristic Replacement.All within the spirits and principles of the present invention, any modification, equivalent replacement, improvement and so on should be included in this hair Within bright protection scope.

Claims (5)

1. a kind of method of audio customized recording and broadcasting, comprising the following steps:
1) recording access is called to start to record;
It 2) will be in audio filling the first recording buffer;
3) when filling up the first recording buffer, automatic the second recording of filling buffer, and trigger recording readjustment;
4) setting records call back function and disk is written in voice data stream;
5) the first recording buffer is reentered into recording buffering queue;
6) audio data is read into the first play-out buffer, after filling up and puts it into play buffering queue;
7) instruction for playing the audio is received;
8) it extracts the audio data in the first broadcasting buffer and starts to play;
9) triggering plays readjustment when first play-out buffer finishes playing, and starts to play the audio in the second play-out buffer Data;
10) first play-out buffer continues to read the audio data in the disk, and is reentered into play buffering queue.
2. a kind of method of audio customized recording and broadcasting according to claim 1, which is characterized in that further packet It includes, after the completion of audio recording, by audio files storage to audio server, and returns to the URL character string of the audio file.
3. a kind of method of audio customized recording and broadcasting according to claim 1, which is characterized in that further packet It includes, by the URL character string and plays object binding, the audio data is downloaded by the URL character string, and by described Object is played to play out.
4. a kind of computer readable storage medium, is stored thereon with computer instruction, which is characterized in that the computer instruction fortune Perform claim requires the method and step of 1 to 3 described in any item audio customized recordings and broadcasting when row.
5. a kind of gaming terminal device, which is characterized in that including memory and processor, store on the memory described The computer instruction run on processor, perform claim requires any one of 1 to 3 when the processor runs the computer instruction The method and step of the audio customized recording and broadcasting.
CN201811580267.7A 2018-12-24 2018-12-24 A kind of method of audio customized recording and broadcasting Withdrawn CN109794063A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811580267.7A CN109794063A (en) 2018-12-24 2018-12-24 A kind of method of audio customized recording and broadcasting

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811580267.7A CN109794063A (en) 2018-12-24 2018-12-24 A kind of method of audio customized recording and broadcasting

Publications (1)

Publication Number Publication Date
CN109794063A true CN109794063A (en) 2019-05-24

Family

ID=66557446

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811580267.7A Withdrawn CN109794063A (en) 2018-12-24 2018-12-24 A kind of method of audio customized recording and broadcasting

Country Status (1)

Country Link
CN (1) CN109794063A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101667227A (en) * 2009-09-11 2010-03-10 深圳市五巨科技有限公司 Method for setting game music and device
WO2010076861A1 (en) * 2008-12-29 2010-07-08 株式会社コナミデジタルエンタテインメント Game system and server
CN104216654A (en) * 2013-05-29 2014-12-17 Lg电子株式会社 Mobile terminal and controlling method thereof
CN105068798A (en) * 2015-07-28 2015-11-18 珠海金山网络游戏科技有限公司 System and method for controlling volume and sound effect of game on the basis of Fmod

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010076861A1 (en) * 2008-12-29 2010-07-08 株式会社コナミデジタルエンタテインメント Game system and server
CN101667227A (en) * 2009-09-11 2010-03-10 深圳市五巨科技有限公司 Method for setting game music and device
CN104216654A (en) * 2013-05-29 2014-12-17 Lg电子株式会社 Mobile terminal and controlling method thereof
CN105068798A (en) * 2015-07-28 2015-11-18 珠海金山网络游戏科技有限公司 System and method for controlling volume and sound effect of game on the basis of Fmod

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
中远: "使用Audio Queue Services 播放和录制音频", 《HTTPS://BLOG.CSDN.NET/MIDFAR/ARTICLE/DETAILS/7233454》 *

Similar Documents

Publication Publication Date Title
US8075403B2 (en) System and method for selective distribution of information
CN106385619A (en) Replay method and device for live broadcast video stream
US20080113812A1 (en) Game Scrap System, Game Scrap Method, and Computer Readable Recording Medium Recording Program for Implementing the Method
CN106303331A (en) video recording method, terminal and system
CN104796448B (en) The data processing method and device of network system
CN106792122A (en) Automatic video recording method and device and terminal
CN101370561B (en) Game device, game device control method
JP6317705B2 (en) GAME SERVICE METHOD, COMPUTER-READABLE RECORDING MEDIUM CONTAINING PROGRAM FOR EXECUTING GAME SERVICE METHOD, AND GAME SERVICE SYSTEM
CN111182321B (en) Method, device and system for processing information
CN108614854A (en) Multimedia messages jettison system and method
CN107126701A (en) The method and device of live middle addition game good friend
CN107659831A (en) Media data processing method, client and storage medium
CN112423095A (en) Game video recording method and device, electronic equipment and storage medium
WO2022127272A1 (en) Video generation method and apparatus, electronic device and storage medium
US8574075B2 (en) Asynchronous audio for networked games
CN106162231A (en) The method and device that a kind of net cast turning point is broadcast
CN111346377A (en) Recording and playback method and device for online game, server and terminal
CN109794063A (en) A kind of method of audio customized recording and broadcasting
CN107888558A (en) One kind paints this dubbing method, device and system
CN106060609B (en) Obtain the method and device of picture
US20150081069A1 (en) Audio apparatus for portable devices
CN109300177B (en) Picture processing method and device
CN112188226B (en) Live broadcast processing method, device, equipment and computer readable storage medium
CN113672757B (en) Audio playing method and device
CN108848472A (en) The method and device of change of voice call

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20190524