Summary of the invention
The present invention is a kind of realizes the method and system of multidigit transmission in sound equipment based on Bluetooth communication, realize the reception to voice data based on the priority of a plurality of Bluetooth Receivers, ensures quality and the time efficiency of transfer of data.
The embodiment of the present invention provides a kind of method that realizes the multidigit transmission based on Bluetooth communication in sound equipment, and described method comprises:
The pattern of judgement sound equipment audio reception data;
When if the pattern of judgement sound equipment audio reception data is bluetooth communication mode, obtain the priority of Bluetooth Receiver audio reception data;
Priority sequencing audio reception data according to Bluetooth Receiver;
The voice data of reception is buffered in sound system;
According to the play rules arranged, the voice data of buffer memory is play.
Described method also comprises:
When the pattern of judgement sound equipment audio reception data is peripheral hardware audio interface template pattern, by peripheral hardware audio interface module audio reception data.
Described voice data by reception is buffered in sound system and comprises:
According to Bluetooth Receiver, set up corresponding buffer zone; Perhaps
The sequencing received according to voice data is stored in buffer zone successively.
Described play rules according to the play rules arranged, the voice data of buffer memory being play comprises: the time sequencing that sequencing, voice data receive, random.
The described sequencing of priority according to Bluetooth Receiver audio reception data comprise:
When Bluetooth Receiver all is in the free time, the first audio reception data of the Bluetooth Receiver that priority is high; Perhaps
When the high Bluetooth Receiver of priority during just in the audio reception data, while having voice data to need sound equipment to receive, the Bluetooth Receiver audio reception data that priority is low.
Accordingly, the embodiment of the invention also discloses a kind of system that realizes the multidigit transmission based on Bluetooth communication in sound equipment, described system comprises:
Judge module, be used to judging the pattern of sound equipment audio reception data;
Priority block, while for the pattern in judgement sound equipment audio reception data, being bluetooth communication mode, obtain the priority of Bluetooth Receiver audio reception data;
Bluetooth module, for the priority sequencing audio reception data according to Bluetooth Receiver;
Cache module, be buffered in sound system for the voice data by reception;
Playing module, play the voice data of buffer memory for the play rules according to arranging.
Described system also comprises:
Peripheral hardware audio interface module, while for the pattern in judgement sound equipment audio reception data, being peripheral hardware audio interface template pattern, the audio reception data.
Described cache module is for setting up corresponding buffer zone according to Bluetooth Receiver; The sequencing perhaps received according to voice data is stored in buffer zone successively.
Play rules in described playing module comprises: the time sequencing that sequencing, voice data receive, random.
Described bluetooth module is when Bluetooth Receiver all is in the free time, the first audio reception data of the Bluetooth Receiver that priority is high; Perhaps when the high Bluetooth Receiver of priority during just in the audio reception data, while having voice data to need sound equipment to receive, the Bluetooth Receiver audio reception data that priority is low.
By implementing system and method provided by the invention, by a plurality of Bluetooth Receivers, realize that the voice data in complex environment receives, the sequencing received by Bluetooth Receiver being arranged to priority, during in the face of a plurality of file transfer, according to the priority sequencing, receive the file storage, ensure the stability of transfer of data, also improved the efficiency of data transmission period.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, rather than whole embodiment.Based on the embodiment in the present invention, those of ordinary skills, not making all other embodiment that obtain under the creative work prerequisite, belong to the scope of protection of the invention.
The method that realizes the multidigit transmission based on Bluetooth communication in sound equipment in the embodiment of the present invention comprises: the pattern of judgement sound equipment audio reception data; When if the pattern of judgement sound equipment audio reception data is bluetooth communication mode, obtain the priority of Bluetooth Receiver audio reception data; Priority sequencing audio reception data according to Bluetooth Receiver; The voice data of reception is buffered in sound system; According to the play rules arranged, the voice data of buffer memory is play.
Fig. 1 shows the method flow diagram of realizing the multidigit transmission based on Bluetooth communication in sound equipment in the embodiment of the present invention, specific as follows:
S101: sound equipment is opened;
S102: the pattern of judgement sound equipment audio reception data;
Sound system in the embodiment of the present invention is based on traditional sound system, having increased bluetooth communication mode, and sound equipment, can be based on Bluetooth Receiver audio reception data when receiving data, also can be based on peripheral hardware audio interface audio reception data.
S103: when the pattern of judgement sound equipment audio reception data is peripheral hardware audio interface template pattern, by peripheral hardware audio interface module audio reception data.
When if sound equipment passes through peripheral hardware audio interface audio reception data, it can, by the mode audio reception data of transmission, realize the broadcasting to voice data.
S104: if when the pattern of judgement sound equipment audio reception data is bluetooth communication mode, obtain the priority of Bluetooth Receiver audio reception data;
It should be noted that, the embodiment of the present invention is based on the multidigit transmission principle and realizes the reception to voice data, when traditional sound equipment receives data based on Bluetooth communication, adopts a bluetooth module to realize.But based on being responsible for, in environment, during in the face of a plurality of data receiver, based on diversity and the complexity of file transfer, configured the Bluetooth Receiver more than 2 in the embodiment of the present invention.It is good that general Bluetooth Receiver is 2 to 3.
In two Bluetooth Receivers of configuration, two Bluetooth Receivers are carried out to the setting of priority, one is the Bluetooth Receiver of high priority, one is the Bluetooth Receiver of low priority.In three Bluetooth Receivers of configuration, three Bluetooth Receivers are carried out to the setting of priority, one is the Bluetooth Receiver of high priority, and one is the Bluetooth Receiver of higher priority, and one is the Bluetooth Receiver of low priority.When only having voice data to receive, be generally that the Bluetooth Receiver by high priority completes, or complete by the Bluetooth Receiver that system default configures.If while having plural voice data to receive, be at first that the Bluetooth Receiver that does priority receives, be secondly the Bluetooth Receiver of low priority receives, go down successively.
S105: according to the priority sequencing audio reception data of Bluetooth Receiver;
When Bluetooth Receiver all is in the free time, the first audio reception data of the Bluetooth Receiver that priority is high.Perhaps sound system has in the situation of acquiescence, at first meets the audio reception data of acquiescence.
When there being plural voice data to need to receive, the Bluetooth Receiver that priority is high first connects the reception data, connects and receives data after the low Bluetooth Receiver of priority.
When the high Bluetooth Receiver of priority during just in the audio reception data, while having voice data to need sound equipment to receive, the Bluetooth Receiver audio reception data that priority is low.
S106: the voice data of reception is buffered in sound system;
It should be noted that, in sound system, can set up corresponding buffer zone according to Bluetooth Receiver, such as the Bluetooth Receiver according to high priority arranges a buffer zone, according to the Bluetooth Receiver of low priority, a buffer zone is set, the data file that so two receivers receive is stored in respectively different zones.
In addition, sound system also can be stored in buffer zone successively according to the sequencing that voice data receives.First audio file received such as the Bluetooth Receiver of high priority comes the first, and the second audio file that the Bluetooth Receiver of low priority receives comes second.
S107: the voice data of buffer memory is play according to the play rules arranged.
The play rules here comprises that the time sequencing that sequencing is play, voice data receives is play, shuffle etc.
Accordingly, Fig. 2 shows the system configuration schematic diagram of realizing the multidigit transmission based on Bluetooth communication in sound equipment of the embodiment of the present invention, comprises as lower module:
Judge module, be used to judging the pattern of sound equipment audio reception data;
Priority block, while for the pattern in judgement sound equipment audio reception data, being bluetooth communication mode, obtain the priority of Bluetooth Receiver audio reception data;
Bluetooth module, for the priority sequencing audio reception data according to Bluetooth Receiver;
Cache module, be buffered in sound system for the voice data by reception;
Playing module, play the voice data of buffer memory for the play rules according to arranging.
Accordingly, this system also comprises: peripheral hardware audio interface module, and while for the pattern in judgement sound equipment audio reception data, being peripheral hardware audio interface template pattern, the audio reception data.
The cache module here is for setting up corresponding buffer zone according to Bluetooth Receiver; The sequencing perhaps received according to voice data is stored in buffer zone successively.
Play rules in the playing module here comprises: the time sequencing that sequencing, voice data receive, random.
The bluetooth module here is when Bluetooth Receiver all is in the free time, the first audio reception data of the Bluetooth Receiver that priority is high; Perhaps when the high Bluetooth Receiver of priority during just in the audio reception data, while having voice data to need sound equipment to receive, the Bluetooth Receiver audio reception data that priority is low.
To sum up, by implementing system and method provided by the invention, by a plurality of Bluetooth Receivers, realize that the voice data in complex environment receives, the sequencing received by Bluetooth Receiver being arranged to priority, during in the face of a plurality of file transfer, according to the priority sequencing, receive the file storage, ensured the stability of transfer of data, also improved the efficiency of data transmission period.
One of ordinary skill in the art will appreciate that all or part of step in the whole bag of tricks of above-described embodiment is to come the hardware that instruction is relevant to complete by program, this program can be stored in a computer-readable recording medium, storage medium can comprise: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), disk or CD etc.
Above a kind of method and system that realize in sound equipment that based on Bluetooth communication multidigit is transmitted that the embodiment of the present invention is provided are described in detail, applied specific case herein principle of the present invention and execution mode are set forth, the explanation of above embodiment is just be used to helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, all will change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.