[0039]At present, there is a problem in the market, and there is a problem with ordinary ear.
[0040]The Android system version is severe, the model is diverse, and many mobile phone manufacturers are re-transformed, so that the interface of the Android system is used directly, and the hardware support is different, resulting in different ear-back effects. Specific performance in high delay and no support Wait. (Including the audio recording software in the market also has high delayed problems in some mobile phones in the ear, and the Android system is the acquisition and output of the call system interface for audio. The developer optimized from the APP level is extremely limited.
[0041]Therefore, the application first applies when providing the ear to feature, there will be whitelists and blacklist lists, detecting whether the terminal device supports earbing fees. And provide a unified ear to the function interface, simplify the access of outer business. Enable the ear-playback frequency of any mobile phone manufacturers to achieve earbacking.
[0042]Further, for the problem of the population that occurs during the ear, the present application is set to the maximum number of the minimum frame of the ear to play the audio playing unit, as well as the maximum value of the audio sampling frame, and the frame of the audio playing unit The number is set to an integer multiple of the number of frames of the audio recording unit in the audio recording device, so that there is a problem that appears in the ear, and the problem of audio intermittent playback occurs.
[0043]For the problem of frequent application of memory, the present application reopening the audio data memory space for storing audio data by using no idle queue in the multiplex queue; putting the memory space stored in the memory data. In the context; when audio data is read from the write queue, the address corresponding to the audio data read in the write queue is empty, and the empty address is reclaimed to the multiplex queue, so that the audio recording device is saved. Memory use, avoiding the problem of carton during audio playback.
[0044]In order to better understand the present application scheme, the technical solutions in the present application embodiment will be apparent from the drawings in the present application, and the described embodiments are clearly described herein. It is an embodiment of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without making creative labor premises, all of the present application protected.
[0045]Seefigure 1 ,figure 1 Method flow diagram of one embodiment of a memory multiplexing method in an audio recording apparatus, such asfigure 1 Distancefigure 1 Including:
[0046]101, receive audio data;
[0047]It should be noted that the recording of audio data is received first in the process of storing recorded audio data to the memory card of the audio recording device.
[0048]102. When there is no idle queue in the multiplex queue, the memory space corresponding to the audio data size is reopened for storage of audio data;
[0049]It should be noted that the audio recording device can include two queues, which are multiplexed queues and write queues, and write queues can be used to write recorded audio data, and multiplex queues can be used for memory calls and recycling.
[0050]In a specific embodiment, when there is no idle queue in the multiplex queue (the idle queue indicates the memory space that is not occupied), re-opening up a new memory space for storing audio data, where the newly opened memory The size of the space is the size of the amount of data received by the received audio data.
[0051]103, the memory space stored in the memory of the audio data is put into the queue;
[0052]It should be noted that the memory space that is opened to the audio data is placed in the write queue, so that the recording of the received recording is stored in the write queue, so that the audio recording device can directly read directly from the write queue. Audio data.
[0053]104. Read the audio data from the write queue, clear the address corresponding to the audio data read in the write queue, and incorporate the address into the multiplex queue.
[0054]It should be noted that after the audio recording device reads the complex frequency data from the write queue, the address corresponding to the read-based frequency data can be cleared, and the recovered address can be incorporated into the multiplex queue. Use so that the next time the next time the audio data provides memory space, thereby achieving the purpose of saving the operation of the memory, and reducing the new memory space and recycling memory space.
[0055]The present application re-openeds up the audio data memory space for storage audio data by no idle queue in the multiplex queue; putting the memory space stored in the memory data into the queue; when reading the audio from the write queue Data, empty the address corresponding to the audio data read in the write queue, and reclaim the empty address to the multiplex queue, so that the memory usage of the audio recording device is saved, avoiding the carton in the audio playback. problem.
[0056]The present application also provides another embodiment of a memory multiplexing method in an audio recording device, such asfigure 2 Distancefigure 2 Including:
[0057]201, receive audio data;
[0058]It should be noted that, in addition, the present application stores recorded audio data to the memory card of the audio recording device, first receives the recorded audio data.
[0059]202. When there is no idle queue in the multiplex queue, the memory space corresponding to the audio data size is reopened is used to store audio data;
[0060]It should be noted that the audio recording device can include two queues, which are multiplexed queues and write queues, and write queues can be used to write recorded audio data, and multiplex queues can be used for memory calls and recycling.
[0061]In a specific embodiment, when there is no idle queue in the multiplex queue (the idle queue indicates the memory space that is not occupied), re-opening up a new memory space for storing audio data, where the newly opened memory The size of the space is the size of the amount of data received by the received audio data.
[0062]203. When there is a space queue in the multiplex queue, the vacant memory space is acquired from the multiplex queue is used to store audio data;
[0063]It should be noted that when there is a space queue in the multiplex queue, you can get the vacant memory space directly from the multiplex queue to store audio data, without having to open up new space to store audio data, so that reduced memory The frequency of recovery, improves the utilization of memory.
[0064]204, the memory space stored in the audio data is placed in the write queue;
[0065]It should be noted that the memory space that is opened to the audio data, or directly from the multiplex queue to store the memory space of the audio data into the write queue, the recording of the recording is to be written. In the queue. Make the audio recording device to read the recorded audio data directly from the write queue.
[0066]205. Read the audio data from the write queue, empty the address corresponding to the audio data read in the write queue, and incorporate the address into the multiplex queue;
[0067]It should be noted that after the audio recording device reads the complex frequency data from the write queue, the address corresponding to the read-based frequency data can be cleared, and the recovered address can be incorporated into the multiplex queue. Use so that the next time the next time the audio data provides memory space, thereby achieving the purpose of saving the operation of the memory, and reducing the new memory space and recycling memory space.
[0068]206. Write the read audio data to the memory card of the audio recording device.
[0069]It should be noted that the audio recording device can read the recorded audio data from the write queue, and write the read audio data into the memory card so that the terminal device can acquire audio data to play.
[0070]In a specific embodiment, further comprising:
[0071]Get the number of buffers audio frames of the audio recording device, and the number of audio sampling frames of the audio recording device in the preset time;
[0072]It should be noted that since the minimum data unit returned in the ear to the audio playback unit is smaller than the number of audio sampling frames of the Android device buffer audio frame number or less than the audio sampling frame within 10 milliseconds in 10 milliseconds. A pop will appear. Therefore, the present application first needs to obtain the number of buffer audio frames of the audio recording device, and the number of audio sampling frames of the audio recording device in the preset time, thereby according to the number of buffer audio frames and audio within the preset time. The size of the sampling frame is set to set the number of minimum frames of the ear to the audio playing unit.
[0073]Set the minimum frame number of the ear to the audio playing unit to the maximum value of the buffer audio frame and the number of audio sampling frames;
[0074]It should be noted that the present application can set the number of minimum frames played by the ear to each frame to the number of buffer audio frames and the maximum number of audio sampling frames of the 10 millisecond.
[0075]The number of frames of the ear to audio playing unit is set to an integer multiple of the number of frames of the audio recording unit in the audio recording device.
[0076]It should be noted that when the number of frames played with each frame is greater than the number of buffer audio frames and the maximum value in the number of audio sampling frames recorded in 10 milliseconds, the problem of popping audio data can be eliminated. However, when the number of frames played with each frame is, the longer the time from the audio recorded to the filled audio, the longer the time, the longer the ear to delay. Moreover, the number of frames playing each frame of each frame is not an integer multiple of the number of frames of the audio recording unit in the audio recording device, and the problem of audio interrupt occurs (because the audio playback unit needs to collect the corresponding frame number to play the corresponding audio data. ). Therefore, the number of frames of the ear to audio playing unit can be set to an integer multiple of the number of frames of the audio recording unit in the audio recording device.
[0077]The above is an embodiment of the method of the present application, and the present application also provides an embodiment of a memory multiplexing device in an audio recording apparatus, such asimage 3Distanceimage 3Including:
[0078]The receiving unit 301 is configured to receive audio data;
[0079]Memory Development Unit 302, used to reopen the memory space corresponding to the audio data size when there is no idle queue in the multiple queue;
[0080]The memory placed in unit 303 is used to place the memory space stored in the audio data into the write queue;
[0081]The memory reuse unit 304 is configured to pass the audio data from the write queue, empty the address corresponding to the audio data read in the write queue, and incorporate the address into the multiplex queue.
[0082]In a specific embodiment, further comprising:
[0083]Memory acquisition units are used to get vacant memory spaces from the multiplex queue when there is a space queue in the multiplex queue.
[0084]In a specific embodiment, further comprising:
[0085]The data write unit is used to write the read audio data to the memory card of the audio recording device.
[0086]The present application also provides a memory multiplexing device in an audio recording device including a processor and a memory: memory is used to store program code, and transmit program code to the processor; processor is used in instructions in program code An embodiment of the memory multiplexing method in an audio recording apparatus is implemented.
[0087]The present application also provides a computer readable storage medium, a computer readable storage medium for storing program code, program code for performing an embodiment of a memory multiplexing method in an audio recording device of the present application.
[0088]Those skilled in the art will clearly understand that in order to describe convenient and concise, the specific operation of the above-described system, apparatus, and unit, can refer to the corresponding process in the foregoing method embodiment, and will not be described herein.
[0089]The terms "including" and "have" and "have any deformed", which is intended to cover, for example, the process, method, system, product, or device that includes a series of steps or units, including a series of steps or units, is not necessarily limited to clearly These steps or units may include other steps or units that are not clearly listed or for these processes, methods, products, or equipment.
[0090]It should be understood that "at least one (item) refers to one or more," multiple "refers to two or more than two. "And / or", used to describe the association relationship of the associated object, indicating that there may be three relationships, for example, "a and / or b" can be represented: there is only A, there is only B and the three situations of A and B Where A and B can be single or plural. Character "/" generally means that the associated object is a "or" relationship. "The following at least one of (s) or its similar expression refers to any combination of these items, including any combination of single items or plural (s). At least one of A, B or C, can be represented by: A, B, C, "A and B", "A and C", "B and C", or "A and B and C. ", Of which A, b, and c can be single or multiple.
[0091]In several embodiments provided herein, it should be understood that the disclosed systems, apparatus, and methods can be implemented in other ways. For example, the device embodiment described above is merely a schematic, for example, the division of the unit is only a logic function division, and there may be additional division mode, such as a plurality of units or components, may be combined or Can be integrated into another system, or some features can be ignored, or not executed. Further, each of the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit can be generated separately, or two or more units can be integrated into one unit. The above-described integrated units can be implemented in the form of hardware, or may be implemented in the form of a software functional unit.
[0092]The integrated unit can be stored in a computer readable storage medium if implemented in the form of a software functional unit and is sold or used as a stand-alone product. Based on this understanding, the technical solution of the present application essentially ors a portion of the prior art or all or part of the technical solution can be embodied in the form of software products, the computer software product is stored in a storage medium. A number of instructions are used to enable a computer device (which can be a personal computer, server, or network device, etc.) to perform all or some steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (English full name: read-onlymemory, English abbreviation: ROM), random access memory (English full name: Random Access Memory, English Abbreviation: RAM), Disk Alternatively, various media such as the disc can store the program code.
[0093]As described above, the above embodiments are intended to illustrate the technical solutions of the present application, not limiting them; although the foregoing embodiments have been described in detail, those of ordinary skill in the art will understand that it can still The technical solution described in the various embodiments is modified, or part of the technical features in which these modifications or replacements do not allow the nature of the corresponding technical solutions from the spirit and scope of the present invention.