JP2008140434A - Digital audio device and its sample rate changing method - Google Patents

Digital audio device and its sample rate changing method Download PDF

Info

Publication number
JP2008140434A
JP2008140434A JP2006323207A JP2006323207A JP2008140434A JP 2008140434 A JP2008140434 A JP 2008140434A JP 2006323207 A JP2006323207 A JP 2006323207A JP 2006323207 A JP2006323207 A JP 2006323207A JP 2008140434 A JP2008140434 A JP 2008140434A
Authority
JP
Japan
Prior art keywords
audio data
sample rate
unit
analog signal
audio
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
JP2006323207A
Other languages
Japanese (ja)
Inventor
Akinari Iwasaki
晃也 岩崎
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.)
Alpine Electronics Inc
Original Assignee
Alpine Electronics Inc
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 Alpine Electronics Inc filed Critical Alpine Electronics Inc
Priority to JP2006323207A priority Critical patent/JP2008140434A/en
Publication of JP2008140434A publication Critical patent/JP2008140434A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Signal Processing For Digital Recording And Reproducing (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a digital audio device capable of preventing cutting-off of a tail of played music and shortening sound break time between pieces of music at the time of changing a sample rate, and its sample rate changing method. <P>SOLUTION: The digital audio device is provided with a device for transmitting a digital data stream, and a host unit for receiving the digital data stream to reproduce an analog signal. The device notifies the host unit of a new sample rate before transmission of audio data of music of a sample rate different from a rate thus far. The host unit saves an identification code to identify the notified sample rate after addition of the audio data received from the device. An analog signal reproduction part (DSP) sequentially reads audio data from a memory, and converts the audio data into an analog signal based on a sample rate indicated by the sample rate identification code added to the audio data. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明はディジタルオーディオ装置及びそのサンプルレート切り替え方法に係わり、特に、ディジタルデータストリームを送信するデバイスと、該ディジタルデータストリームを受信してアナログ信号を再生するホストユニットと、前記デバイスとホストユニット間を双方向にデータ送受可能に接続するバスを備えたディジタルオーディオ装置及びそのサンプルレート切り替え方法に関する。   The present invention relates to a digital audio apparatus and a sample rate switching method thereof, and more particularly to a device that transmits a digital data stream, a host unit that receives the digital data stream and reproduces an analog signal, and between the device and the host unit. The present invention relates to a digital audio apparatus having a bus connected so as to be able to transmit and receive data in both directions and a sample rate switching method thereof.

USBオーディオでは、USB.orgが定める「USB Audio Class」に基づいて、ディジタルサウンドをリアルタイムストリームするデバイス(USB function)と、該ストリームを受信しつつリアルタイムで再生するホストユニット(USB host)が存在し、両者間がUSBバスで双方向に通信可能に接続されている。
このUSBオーディオでは、USBバス上を流れるディジタルサウンドデータに関して、USB.orgの定める仕様に従い、定期的(USB Audio Class 1.0では1msec周期)にパケット単位でオーディオデータがストリームされる。すなわち、ホストユニットが定期的にデバイスにパケットを要求し、デバイスは該要求にしたがってパケットをホストユニットに送信する。
従来、このようなオーディオシステムにおいて、ホストユニット(USB host)は、これらのパケットを一定数(例えば50パケット)下位ドライバのバッファに溜め、一杯になると上位ドライバに渡し、上位ドライバもしくはアプリケーションがDSP(ディジタルシグナルプロセッサ)用バッファへそのデータを渡し、DSPはジッタを吸収できる程度(通常数百msec)にバッファを溜めた上で再生(DA変換)を開始する。
In USB audio, there is a device (USB function) that streams digital sound in real time and a host unit (USB host) that plays back the stream in real time based on the “USB Audio Class” defined by USB.org. The two are connected via a USB bus so that they can communicate in both directions.
In this USB audio, audio data is streamed in units of packets periodically (1 msec cycle in USB Audio Class 1.0) according to the specifications defined by USB.org for digital sound data flowing on the USB bus. That is, the host unit periodically requests a packet from the device, and the device transmits the packet to the host unit according to the request.
Conventionally, in such an audio system, a host unit (USB host) stores a certain number (for example, 50 packets) of these packets in the buffer of a lower driver and passes them to the upper driver when it is full. The data is passed to the buffer for the digital signal processor), and the DSP accumulates the buffer to such an extent that it can absorb jitter (usually several hundred msec) and then starts reproduction (DA conversion).

図10はかかる従来のオーディオシステムの構成図であり、デバイス(USB function)1とホストユニット(USB host)2がUSBバス3で双方向に通信可能に接続されている。デバイス1はADコンバータ1aや処理部(図示せず)を備え、ADコンバータ1a はUSBマイクデバイスからマイク入力端子1bを介して入力するアナログ信号やUSB用ライン入力デバイスからLine-In端子1cを介して入力するアナログ信号を所定のサンプリング速度でAD変換してメモリ(図示せず)に保存し、ホストユニット2から要求がある毎に処理部はオーディオデータをパケット化して送信する。なお、Line-In端子からディジタルオーディオデータが入力する場合もある。
ホストユニット2のホストコントローラドライバ(下位ドライバ)2aは、例えば1msec周期でデバイス1に対してオーディオデータを要求し、デバイス1よりパケットを受信する毎にバッファメモリ2bに格納する。USBオーディオクラスドライバ(上位ドライバ)2cは、バッファメモリに50パケット分のオーディオデータが保存されれば、該オーディオデータをバッファメモリから読み取り、アプリケーション部2dを介してDSP用バッファ2eに保存する。オーディオデータ再生用のDSP2fはバッファ2eにジッタを吸収できる程度(通常数百msec)のオーディオデータが保存されてから順次オーディオデータを該バッファ2eから読み出してアナログ信号に変換してオーディオ回路(図示せず)に入力する。DSP用バッファ2eには書き込みと読み出しが並行して行なわれる。
FIG. 10 is a configuration diagram of such a conventional audio system, in which a device (USB function) 1 and a host unit (USB host) 2 are connected via a USB bus 3 so as to be capable of bidirectional communication. The device 1 includes an AD converter 1a and a processing unit (not shown). The AD converter 1a receives an analog signal input from the USB microphone device via the microphone input terminal 1b and a line input device for USB via the Line-In terminal 1c. The input analog signal is AD converted at a predetermined sampling rate and stored in a memory (not shown), and the processing unit packetizes and transmits the audio data every time there is a request from the host unit 2. Digital audio data may be input from the Line-In terminal.
The host controller driver (lower driver) 2a of the host unit 2 requests audio data from the device 1, for example, at a period of 1 msec, and stores it in the buffer memory 2b every time a packet is received from the device 1. When audio data for 50 packets is stored in the buffer memory, the USB audio class driver (upper driver) 2c reads the audio data from the buffer memory and stores it in the DSP buffer 2e via the application unit 2d. The audio data reproduction DSP 2f reads audio data from the buffer 2e sequentially after the audio data is stored in the buffer 2e so that jitter can be absorbed (usually several hundred msec) and converts it into an analog signal (not shown). )). Writing and reading are performed in parallel in the DSP buffer 2e.

かかるUSBオーディオシステムにおいて、デバイス1のADコンバータ1aのサンプルレート(AD変換レート)を変更したい場合がある。例えば、ユーザーがサンプルレートを変えた時の音質をチェックしたい場合などである。かかるサンプルレートを変える方法として第1、第2の方法がある。
第1のサンプルレート変更方法では、キー操作によりユーザーからのサンプルレート変更コマンドが発生すると、ホストユニット2のアプリケーション部2dは、下位ドライバ2aにストリームの中止を通知する(図10中の(1)、 ストリーム停止要求)。一方、DSP 2fは、DSP用バッファ2e内の残りデータの再生をし続け、すべて再生しきった時点でアプリケーション部2dに再生終了を通知する(図10中の(2))。アプリケーション部2dは該通知を受信すれば、DSP 2fに対して新サンプルレートを設定する(図10中の(3) 新サンプルレート設定)。しかる後、アプリケーション部2dは下位ドライバ2aを通じてサンプルレートの変更をデバイス1に指示し(図10中の(4) サンプルレート変更通知)、下位ドライバ2aは再度デバイス1に対してストリームの要求を開始する(図10中の(5))。以後、前述のごとくデバイス1からオーディオデータ(パケット)が送信され、DSPバッファ2eにジッタを吸収できる程度(通常数百msec)のオーディオデータが保存されるとDSP 2fは再生動作が開始する。
In such a USB audio system, it may be desired to change the sample rate (AD conversion rate) of the AD converter 1a of the device 1. For example, when the user wants to check the sound quality when the sample rate is changed. There are first and second methods for changing the sample rate.
In the first sample rate changing method, when a sample rate change command from the user is generated by a key operation, the application unit 2d of the host unit 2 notifies the lower driver 2a that the stream is stopped ((1) in FIG. 10). Stream stop request). On the other hand, the DSP 2f continues to reproduce the remaining data in the DSP buffer 2e and notifies the application unit 2d of the end of reproduction when all the data has been reproduced ((2) in FIG. 10). Upon receiving the notification, the application unit 2d sets a new sample rate for the DSP 2f ((3) New sample rate setting in FIG. 10). After that, the application unit 2d instructs the device 1 to change the sample rate through the lower driver 2a ((4) Sample rate change notification in FIG. 10), and the lower driver 2a starts the stream request to the device 1 again. ((5) in FIG. 10). Thereafter, the audio data (packet) is transmitted from the device 1 as described above, and the DSP 2f starts the reproducing operation when the audio data is stored in the DSP buffer 2e so that the jitter can be absorbed (usually several hundred msec).

図11は第2のサンプルレート変更方法の説明図であり、キー操作によりユーザーからのサンプルレート変更コマンドが発生すると、ホストユニット2のアプリケーション部2dは、下位ドライバ2aにストリームの中止を通知する(図11中の(1)、 ストリーム停止要求)。ついで、アプリケーション部2dは、DSP 2fに指示してDSP 2fの再生を直ちに強制停止し、かつ、DSP用バッファ2eの残りデータをすべて破棄する(図11中の(2))。アプリケーション部2dは、データ破棄後、DSP 2fに対して新サンプルレートを設定する(図11中の(3) 新サンプルレート設定)。しかる後、アプリケーション部2dは下位ドライバ2aを通じてサンプルレートの変更をデバイス1に指示し(図11中の(4) サンプルレート変更通知)、下位ドライバ2aは再度デバイス1に対してストリームの要求を開始する(図11中の(5))。以後、前述のごとくデバイス1からオーディオデータ(パケット)が送信され、DSPバッファ2eにジッタを吸収できる程度(通常数百msec)のオーディオデータが保存されるとDSP 2fは再生動作が開始する。   FIG. 11 is an explanatory diagram of the second sample rate changing method. When a sample rate change command from the user is generated by a key operation, the application unit 2d of the host unit 2 notifies the lower driver 2a that the stream is stopped ( (1) in FIG. 11, stream stop request). Next, the application unit 2d instructs the DSP 2f to immediately forcibly stop the reproduction of the DSP 2f, and discards all remaining data in the DSP buffer 2e ((2) in FIG. 11). After discarding the data, the application unit 2d sets a new sample rate for the DSP 2f ((3) New sample rate setting in FIG. 11). After that, the application unit 2d instructs the device 1 to change the sample rate through the lower driver 2a ((4) Sample rate change notification in FIG. 11), and the lower driver 2a starts the stream request to the device 1 again. ((5) in FIG. 11). Thereafter, the audio data (packet) is transmitted from the device 1 as described above, and the DSP 2f starts the reproducing operation when the audio data is stored in the DSP buffer 2e so that the jitter can be absorbed (usually several hundred msec).

第1のサンプルレート変更方法では、DSPバッファ2eに記憶されているオーディオデータを再生し、しかる後、該DSPバッファ2eに新サンプルレートのオーディオデータが所定量保存されるまで、新サンプルレートの再生音の出力が中断する問題がある。また、第2のサンプルレート変更方法では、新サンプルレートの再生音の出力中断時間が短縮するが、サンプルレート変更前に聞いていたオーディオデータが捨てられて聞けない問題がある。
これらの問題点は、USBマイクデバイスやライン入力デバイスからのサンプルレートをホストユニット2側からの指示により切り替える場合のように、ホストユニット2が完全にサンプルレート変更制御を主動できる場合には、さほどの問題ではなかった。
しかしながら、デバイス1が予めディジタル録音されたサンプルレートが異なる複数の楽曲ファイルを持ち、デバイス側からの契機でサンプルレート変更が発生するような場合に問題が生じる。すなわち、第1のサンプルレート変更方法は、サンプルレート変更時に、ホストユニット2内のDSP用バッファ内にあるオーディオデータをすべて再生しきってからサンプルレート変更を開始し、レート変更後に再び該DSP用バッファへのバッファリングをやり直す必要があり、次の曲の再生までに多大な時間を要してしまう。これでは、曲間での音の途切れ時間が長くなり、ギャップレス再生とはほど遠いシステムとなる問題がある。また、第2のサンプルレート変更方法は、時間短縮のためにDSP用バッファに保存してある未再生のオーディオデータを破棄するものであり、レート変更前の曲の最後の部分を再生せずに捨ててしまい、曲の末尾が切れる問題がある。
従来技術として、入力ディジタル音声信号中のすべての曲が記録可能となるように各曲の音声データ毎にサンプリング周波数および量子化ビット数を制御する技術がある(特許文献1参照)。
特開2000−207842号公報
In the first sample rate changing method, the audio data stored in the DSP buffer 2e is reproduced, and then the new sample rate is reproduced until a predetermined amount of audio data of the new sample rate is stored in the DSP buffer 2e. There is a problem that sound output is interrupted. Further, the second sample rate changing method shortens the output interruption time of the reproduction sound of the new sample rate, but has a problem that the audio data heard before the sample rate change is discarded and cannot be heard.
These problems occur when the host unit 2 can completely perform sample rate change control, such as when the sample rate from the USB microphone device or line input device is switched by an instruction from the host unit 2 side. It was not a problem.
However, a problem arises when the device 1 has a plurality of music files with different sample rates that have been digitally recorded in advance and the sample rate changes when triggered by the device. That is, in the first sample rate changing method, when the sample rate is changed, the sample rate change is started after all the audio data in the DSP buffer in the host unit 2 is reproduced, and after the rate change, the DSP buffer is changed again. It is necessary to redo the buffering, and it takes a long time to play the next song. In this case, there is a problem that the sound interruption time between songs becomes long, and the system becomes far from gapless reproduction. The second sample rate changing method discards unreproduced audio data stored in the DSP buffer to shorten the time, without playing the last part of the song before the rate change. There is a problem that the end of the song is cut off.
As a conventional technique, there is a technique of controlling the sampling frequency and the number of quantization bits for each piece of audio data so that all songs in the input digital audio signal can be recorded (see Patent Document 1).
JP 2000-207842 A

上記従来技術は、サンプルレート変更時における音の途切れ時間を短縮したり、曲の末尾が切れるのを防止する技術ではない。
以上からは、本発明の目的は、ディジタルデータストリームを送信するデバイスと、該ディジタルデータストリームを受信してアナログ信号を再生するホストユニットと、前記デバイスとホストユニット間を双方向にデータ送受可能に接続するバスを備えたディジタルオーディオ装置におけるサンプルレート変更時において、曲間での音の途切れ時間を短縮することである。
本発明の別の目的は、上記ディジタルオーディオ装置におけるサンプルレート変更時において、再生中の曲の末尾が切れないようにし、かつ、曲間での音の途切れ時間を短縮することである。
The above prior art is not a technique for shortening the sound interruption time when changing the sample rate or preventing the end of the music from being cut off.
From the above, the object of the present invention is to enable a device for transmitting a digital data stream, a host unit for receiving the digital data stream and reproducing an analog signal, and bidirectional transmission and reception of data between the device and the host unit. When changing the sample rate in a digital audio apparatus having a bus to be connected, the sound interruption time between songs is shortened.
Another object of the present invention is to prevent the end of a song being played back at the time of changing the sample rate in the digital audio apparatus, and to shorten the sound interruption time between songs.

本発明の第1の態様は、ディジタルデータストリームを送信するデバイスと、該ディジタルデータストリームを受信してアナログ信号を再生するホストユニットと、前記デバイスとホストユニット間を双方向にデータ送受可能に接続するバスを備えたディジタルオーディオ装置である。
本発明の第1のディジタルオーディオ装置において、前記デバイスは、サンプルレートの異なる複数の曲のオーディオデータを記憶する曲記憶部、それまでと異なるサンプルレートの曲のオーディオデータの送信に先立ってホストユニットに新サンプルレートを通知すると共に、前記オーディオデータをホストユニットに送信する制御を行う制御部を備え、ホストユニットは、前記デバイスから受信するオーディオデータを保存するオーディオデータ保存部、前記通知されたサンプルレートを識別するための識別符号を、前記デバイスから受信するオーディオデータに付加して前記オーディオデータ保存部に保存する制御部、前記オーディオデータ保存部からオーディオデータを保存順に読み出し、該オーディオデータに付加されているサンプルレート識別符号が指示するサンプルレートに基づいて該オーディオデータをアナログ信号に変換するアナログ信号再生部を備えている。
本発明の第1のディジタルオーディオ装置において、前記デバイスはホストユニットへオーディオデータをパケット単位で送信し、前記ホストユニットの制御部は該パケットにサンプルレート識別符号を付加して前記オーディオデータ保存部に保存し、前記アナログ信号再生部は保存順にパケットをオーディオデータ保存部から読出し、該パケットに付加されているサンプルレート識別符号が指示するサンプルレートに基づいて該パケットを構成するオーディオデータをアナログ信号に変換する。
本発明の第2のディジタルオーディオ装置において、前記デバイスは、サンプルレートの異なる複数の曲のオーディオデータを記憶する曲記憶部、それまでと異なるサンプルレートの曲のオーディオデータの送信に先立ってホストユニットに新サンプルレートを通知すると共に、前記オーディオデータをホストユニットに送信する制御を行う制御部を備え、ホストユニットは、前記デバイスから受信するオーディオデータを保存するオーディオデータ保存部、前記オーディオデータ保存部からオーディオデータを保存順に読み出し、該オーディオデータをアナログ信号に変換するアナログ信号再生部、前記デバイスから受信するオーディオデータをオーディオデータ保存部に保存すると共に、前記通知された新サンプルレートと該新サンプルレートのオーディオデータの記憶開始位置を前記アナログ信号再生部に通知する制御部を備え、前記アナログ信号再生部はオーディオデータ読出し位置が前記通知された記憶開始位置になったときサンプルレートを前記通知されている新サンプルレートに切り替えてオーディオデータをアナログ信号に変換する。
本発明の第2のディジタルオーディオ装置において、前記デバイスはホストユニットへオーディオデータをパケット単位で送信し、前記ホストユニットの制御部は前記新サンプルレートと該新サンプルレートのパケットの記憶開始位置を前記アナログ信号再生部に通知し、前記アナログ信号再生部はパケット読出し位置が前記通知された記憶開始位置になったときサンプルレートを前記通知されている新サンプルレートに切り替えてパケットを構成するオーディオデータをアナログ信号に変換する。
According to a first aspect of the present invention, a device for transmitting a digital data stream, a host unit for receiving the digital data stream and reproducing an analog signal, and a bi-directional data transmission / reception between the device and the host unit are connected A digital audio device having a bus for
In the first digital audio apparatus of the present invention, the device includes a music storage unit that stores audio data of a plurality of songs having different sample rates, and a host unit prior to transmission of audio data of songs having different sample rates. And a control unit that controls to transmit the audio data to the host unit, the host unit storing an audio data storage unit that stores audio data received from the device, and the notified sample An identification code for identifying the rate is added to the audio data received from the device and stored in the audio data storage unit, and the audio data is read from the audio data storage unit in the order of storage and added to the audio data Being sun Rureto identification code based on the sample rate for instructing comprises an analog signal reproduction section for converting the audio data into an analog signal.
In the first digital audio apparatus of the present invention, the device transmits audio data to the host unit in units of packets, and the control unit of the host unit adds a sample rate identification code to the packets to the audio data storage unit. The analog signal reproduction unit reads the packets from the audio data storage unit in the order of storage, and converts the audio data constituting the packet into an analog signal based on the sample rate indicated by the sample rate identification code added to the packet. Convert.
In the second digital audio apparatus of the present invention, the device includes a song storage unit that stores audio data of a plurality of songs having different sample rates, and a host unit prior to transmission of the audio data of songs having a different sample rate. And a control unit that controls to transmit the audio data to the host unit, and the host unit stores an audio data storage unit that stores audio data received from the device, and the audio data storage unit The audio data is read out in the order of saving, an analog signal reproducing unit that converts the audio data into an analog signal, audio data received from the device is saved in the audio data saving unit, and the notified new sample rate and the new sample A control unit for notifying the analog signal reproduction unit of the storage start position of the audio data of the audio data, and the analog signal reproduction unit notifies the sample rate when the audio data read position is the notified storage start position. The audio data is converted to analog signals by switching to the new sample rate.
In the second digital audio apparatus of the present invention, the device transmits audio data to the host unit in units of packets, and the control unit of the host unit determines the new sample rate and the storage start position of the packet of the new sample rate. The analog signal reproducing unit notifies the audio signal constituting the packet by switching the sample rate to the notified new sample rate when the packet reading position becomes the notified storage start position. Convert to analog signal.

本発明の第2の態様は、ディジタルデータストリームを送信するデバイスと、該ディジタルデータストリームを受信してアナログ信号を再生するホストユニットと、前記デバイスとホストユニット間を双方向にデータ送受可能に接続するバスを備えたディジタルオーディオ装置のサンプルレート切り替え方法である。
本発明の第1のサンプルレート切り替え方法は、前記デバイスにおいて、それまでと異なるサンプルレートの曲のオーディオデータの送信に先立ってホストユニットに新サンプルレートを通知するステップ、前記ホストユニットにおいて、前記通知されたサンプルレートを識別するための識別符号を、前記デバイスから受信するオーディオデータに付加してオーディオデータ保存部に保存するステップ、再生に際して、前記オーディオデータ保存部からオーディオデータを保存順に読み出し、該オーディオデータに付加されているサンプルレート識別符号が指示するサンプルレートに基づいて該オーディオデータをアナログ信号に変換するステップを有している。
本発明の第2のサンプルレート切り替え方法は、前記デバイスは、それまでと異なるサンプルレートの曲のオーディオデータの送信に先立ってホストユニットに新サンプルレートを通知するステップ、前記ホストユニットの制御部は、前記デバイスから受信するオーディオデータをオーディオデータ保存部に記憶すると共に、前記通知された新サンプルレートと該新サンプルレートのオーディオデータの記憶開始位置をアナログ信号再生部に通知するステップ、アナログ信号再生部は、前記オーディオデータ保存部からオーディオデータを保存順に読み出し、オーディオデータ読出し位置が前記通知された記憶開始位置になったときサンプルレートを前記通知されている新サンプルレートに切り替えてオーディオデータをアナログ信号に変換するステップを有している。
According to a second aspect of the present invention, there is provided a device for transmitting a digital data stream, a host unit for receiving the digital data stream and reproducing an analog signal, and connecting the device and the host unit so that data can be transmitted and received bidirectionally. This is a method for switching the sample rate of a digital audio apparatus equipped with a bus.
In the first sample rate switching method of the present invention, a step of notifying the host unit of a new sample rate prior to transmission of audio data of a song having a different sample rate in the device, the notification in the host unit Adding the identification code for identifying the sample rate to the audio data received from the device and storing the identification code in the audio data storage unit; at the time of playback, reading the audio data from the audio data storage unit in the order of storage; The audio data is converted into an analog signal based on the sample rate indicated by the sample rate identification code added to the audio data.
In the second sample rate switching method of the present invention, the device notifies the host unit of a new sample rate prior to transmitting audio data of a song having a different sample rate, and the control unit of the host unit includes: Storing the audio data received from the device in an audio data storage unit, and notifying the analog signal reproduction unit of the notified new sample rate and the storage start position of the audio data of the new sample rate, analog signal reproduction The unit reads audio data from the audio data storage unit in the order of storage, and switches the sample rate to the notified new sample rate when the audio data read position reaches the notified storage start position, and converts the audio data to analog Convert to signal Have that step.

本発明によれば、デバイスはそれまでと異なるサンプルレートの曲のオーディオデータの送信に先立ってホストユニットに新サンプルレートを通知し、ホストユニットにおいて制御部は通知されたサンプルレートを識別するための識別符号を、オーディオデータに付加してオーディオデータ保存部に保存し、アナログ信号再生部はオーディオデータ保存部からオーディオデータを保存順に読み出し、該オーディオデータに付加されているサンプルレート識別符号が指示するサンプルレートに基づいて該オーディオデータをアナログ信号に変換するように構成したから、サンプルレート変更時において、曲間での音の途切れ時間を短縮することができ、しかも、再生中の曲の末尾が切れないようにできる。
また、本発明によれば、前記デバイスはホストユニットへオーディオデータをパケット単位で送信し、前記ホストユニットの制御部は該パケットにサンプルレート識別符号を付加して前記オーディオデータ保存部に保存し、前記アナログ信号再生部は保存順にパケットをオーディオデータ保存部から読出し、該パケットに付加されているサンプルレート識別符号が指示するサンプルレートに基づいて該パケットを構成するオーディオデータをアナログ信号に変換するようにしたから、パケット単位で上記制御ができ、サンプルレート変更制御をシンプルに行うことができる。
また、本発明によれば、デバイスはそれまでと異なるサンプルレートの曲のオーディオデータの送信に先立ってホストユニットに新サンプルレートを通知し、ホストユニットにおいて制御部は通知された新サンプルレートと該新サンプルレートのオーディオデータの記憶開始位置をアナログ信号再生部に通知し、アナログ信号再生部は、オーディオデータ読出し位置が前記通知された記憶開始位置になったときサンプルレートを前記通知されている新サンプルレートに切り替えてオーディオデータをアナログ信号に変換するように構成したから、サンプルレート変更時において、曲間での音の途切れ時間を短縮することができ、しかも、再生中の曲の末尾が切れないようにでき、更には、使用メモリ量を少なくできる。
また、本発明によれば、前記デバイスはホストユニットへオーディオデータをパケット単位で送信し、前記ホストユニットの制御部は前記新サンプルレートと該新サンプルレートのパケットの記憶開始位置を前記アナログ信号再生部に通知し、前記アナログ信号再生部はパケット読出し位置が前記通知された記憶開始位置になったときサンプルレートを前記通知されている新サンプルレートに切り替えてパケットを構成するオーディオデータをアナログ信号に変換するようにしたから、パケット単位で上記制御ができ、サンプルレート変更制御をシンプルに行うことができる。
According to the present invention, the device notifies the host unit of the new sample rate prior to transmission of the audio data of the song having a different sample rate, and the control unit identifies the notified sample rate in the host unit. The identification code is added to the audio data and stored in the audio data storage unit. The analog signal reproduction unit reads the audio data from the audio data storage unit in the order of storage, and the sample rate identification code added to the audio data indicates Since the audio data is converted into an analog signal based on the sample rate, it is possible to reduce the sound interruption time between songs when the sample rate is changed, and the end of the song being played back can be reduced. You can keep it from cutting.
Further, according to the present invention, the device transmits audio data to the host unit in units of packets, and the control unit of the host unit adds a sample rate identification code to the packet and stores it in the audio data storage unit, The analog signal reproduction unit reads packets from the audio data storage unit in the order of storage, and converts audio data constituting the packets into analog signals based on a sample rate indicated by a sample rate identification code added to the packet. Therefore, the above-described control can be performed in packet units, and the sample rate change control can be performed simply.
Further, according to the present invention, the device notifies the host unit of the new sample rate prior to transmission of the audio data of the song having a different sample rate, and the control unit in the host unit notifies the notified new sample rate and the new sample rate. The storage start position of the audio data at the new sample rate is notified to the analog signal reproduction unit, and the analog signal reproduction unit notifies the sample rate when the audio data read position reaches the notified storage start position. Since the audio data is converted to analog signals by switching to the sample rate, it is possible to reduce the sound interruption time between songs when changing the sample rate, and the end of the song being played is cut off. In addition, the amount of memory used can be reduced.
Further, according to the present invention, the device transmits audio data to the host unit in units of packets, and the control unit of the host unit determines the new sample rate and the storage start position of the packet of the new sample rate as the analog signal reproduction. The analog signal reproducing unit switches the sample rate to the notified new sample rate when the packet reading position becomes the notified storage start position, and converts the audio data constituting the packet into an analog signal. Since the conversion is performed, the above-described control can be performed in packet units, and the sample rate change control can be simply performed.

(A)第1実施例
(a)構成
図1は本発明の第1実施例の構成図である。
デバイス(USB function)10とホストユニット(USB host)20がUSBバス30で双方向に通信可能に接続されている。デバイス10は、サンプルレートの異なる複数の曲のオーディオデータを記憶する曲記憶部11、処理部12などを有している。なお、デバイス10は図10で示したADコンバータやマイク入力インターフェース、Line-Inインターフェースなどを有しているが本発明と関係がないので図示は省略している。サンプルレートとしては、たとえば44.1kHz,48kHz,32kHzなどがあり、図ではこれらサンプルレートの曲A,B,Cが曲記憶部11に記憶されている状態が示されている。処理部12は、それまでと異なるサンプルレートの曲のパケット(オーディオデータ)の送信に先立ってホストユニットに新サンプルレートを通知すると共に、前記パケットをホストユニットに送信する制御を行う。
ホストユニット20のUSBインターフェース21はUSBバス30を介してデバイス10とパケット(オーディオデータ)、制御データの送受を行い、デバイス10より受信したパケットをホストコントローラドライバ(下位ドライバ)21に入力し、サンプルレート変更通知をアプリケーション部25に入力する。
ホストコントローラドライバ22は、例えば1msec周期でUSBインターフェース21を介してデバイス10に対してオーディオデータを要求し、デバイス10よりパケットを受信する毎にバッファメモリ23に格納する。USBオーディオクラスドライバ(上位ドライバ)24は、バッファメモリ23に50パケットのオーディオデータが保存されれば、該オーディオデータを該バッファメモリから読み取り、アプリケーション部25を介してDSP用バッファ26に保存する。オーディオ再生用のDSP 27はDSP用バッファ26にジッタを吸収できる程度(通常数百msec)のオーディオデータが保存されてから順次オーディオデータを該バッファ26から読み出してアナログ信号に変換してオーディオ回路(図示せず)に入力する。DSP用バッファ26には書き込みと読み出しが並行して行なわれる。
(A) First Embodiment (a) Configuration FIG. 1 is a configuration diagram of a first embodiment of the present invention.
A device (USB function) 10 and a host unit (USB host) 20 are connected via a USB bus 30 so as to be capable of bidirectional communication. The device 10 includes a song storage unit 11 and a processing unit 12 that store audio data of a plurality of songs having different sample rates. The device 10 includes the AD converter, microphone input interface, line-in interface, and the like shown in FIG. 10, but is not shown because it is not related to the present invention. Examples of the sample rate include 44.1 kHz, 48 kHz, and 32 kHz. The figure shows a state in which the music pieces A, B, and C of these sample rates are stored in the music storage unit 11. The processing unit 12 notifies the host unit of the new sample rate prior to transmission of the packet (audio data) of the music sample having a different sample rate, and controls to transmit the packet to the host unit.
The USB interface 21 of the host unit 20 transmits and receives packets (audio data) and control data to and from the device 10 via the USB bus 30, and inputs the packets received from the device 10 to the host controller driver (lower driver) 21 for sample processing. A rate change notification is input to the application unit 25.
The host controller driver 22 requests audio data from the device 10 via the USB interface 21 at a cycle of 1 msec, for example, and stores the packet in the buffer memory 23 every time a packet is received from the device 10. When 50 packets of audio data are stored in the buffer memory 23, the USB audio class driver (upper driver) 24 reads the audio data from the buffer memory and stores it in the DSP buffer 26 via the application unit 25. The audio reproduction DSP 27 reads audio data from the buffer 26 and converts it into an analog signal sequentially after the audio data is stored in the DSP buffer 26 so that jitter can be absorbed (usually several hundred msec). (Not shown). The DSP buffer 26 is written and read in parallel.

図2はデバイス10の詳細構成図であり、ADコンバータやマイク入力インターフェース、Line-Inインターフェースなどは省略している。曲記憶部11には外部のディジタルオーディオデバイスからディジタルインターフェース13を介してサンプルレートの異なる複数の曲A,B,C,…がディジタルで保存されている。各曲データは、曲サイズ(バイト数)やサンプルレートなどの曲制御情報とオーディオデータを有している。
処理部12は、曲のサンプルレートが変化することを検出し、サンプルレートが変わった曲のオーディオデータの送信に先立ってホストユニット20にUSBバスインターフェース部14を介してレート変更および新サンプルレートを通知する。また、処理部12はホストユニット20からデータリクエストがある毎にオーディオデータをパケット単位でUSBバスインターフェース部14を介してホストユニット20に送信する制御を行う。USBバスインターフェース部14は上り、下りのインターフェースを備え、オーディオデータや制御データを送受するようになっている。
FIG. 2 is a detailed configuration diagram of the device 10, and an AD converter, a microphone input interface, a line-in interface, and the like are omitted. The music storage unit 11 stores a plurality of music A, B, C,... With different sample rates from an external digital audio device via the digital interface 13 in digital form. Each piece of music data includes music control information such as a music size (number of bytes) and a sample rate, and audio data.
The processing unit 12 detects that the sample rate of the song has changed, and sends the rate change and new sample rate to the host unit 20 via the USB bus interface unit 14 prior to transmission of the audio data of the song whose sample rate has changed. Notice. The processing unit 12 performs control to transmit audio data to the host unit 20 via the USB bus interface unit 14 in units of packets every time there is a data request from the host unit 20. The USB bus interface unit 14 includes upstream and downstream interfaces, and transmits and receives audio data and control data.

(b)サンプルレート通知処理
図3は処理部12のサンプルレート通知処理フローである。なお、処理部12は現在再生中の曲の曲サイズ、サンプルレートをおよび再生中の曲の残データサイズを内蔵の記憶部に保存してある(ステップ101)。
処理部12はパケットリクエストがホストユニット20から受信したか監視し(ステップ102)、パケットリクエストを受信すれば現在再生中のオーディオデータを1パケット分、曲記憶部11から読出しテホストユニット20に送信する(ステップ103)。しかる後、残データサイズを更新し(ステップ104)、残データサイズが零になったかチェックする(ステップ105)。零でなければ、ステップ102以降の処理を繰り返し、残データサイズが零になれば、全曲の再生が完了したかチェックし(ステップ106)、再生が完了していれば処理を終了する。
しかし、全曲の再生が完了してなければ、次の曲のサイズ及びサンプルレートを保存し(ステップ107)、該新サンプルレートがそれまでのサンプルレートと異なるかチェックし(ステップ108)、一致していればステップ102以降の処理を行なう。
一方、新サンプルレートがそれまでのサンプルレートと異なれば、新サンプルレートをUSBバスインターフェース24を介してホストユニット20に通知し(ステップ109)、ステップ102以降の処理を行なう。
(B) Sample Rate Notification Process FIG. 3 is a sample rate notification process flow of the processing unit 12. The processing unit 12 stores the song size and sample rate of the currently played song and the remaining data size of the currently played song in the built-in storage unit (step 101).
The processing unit 12 monitors whether a packet request has been received from the host unit 20 (step 102). If the packet request is received, one packet of audio data currently being reproduced is read from the music storage unit 11 and transmitted to the data host unit 20. (Step 103). Thereafter, the remaining data size is updated (step 104), and it is checked whether the remaining data size has become zero (step 105). If it is not zero, the processes in and after step 102 are repeated. If the remaining data size is zero, it is checked whether the reproduction of all songs has been completed (step 106). If the reproduction has been completed, the process is terminated.
However, if the playback of all songs has not been completed, the size and sample rate of the next song are saved (step 107), and the new sample rate is checked to be different from the previous sample rate (step 108). If so, the processing after step 102 is performed.
On the other hand, if the new sample rate is different from the previous sample rate, the new sample rate is notified to the host unit 20 via the USB bus interface 24 (step 109), and the processing after step 102 is performed.

(c)サンプルレート変更処理
図4はホストユニット20のサンプルレート変更処理フローである。なお、ホストコントローラドライバ22は現在再生中の曲のサンプルレートを内蔵のメモリに保存してある。
ホストユニット20のアプリケーション部25はデバイス10からサンプルレート変更通知を受信したか監視しており(ステップ201)、サンプルレート変更通知を受信しなければ、ホストコントローラドライバ22は定期的に、例えば1msec毎にパケットリクエストをデバイス10に送信し(ステップ202)、デバイス10から受信したオーディオパケットの先頭にサンプルレートを表すレート識別子を加えてバッファメモリ23に格納する(ステップ203)。ついで、バッファメモリ23に50パケット分格納されたかチェクし(ステップ204)、格納されていなければステップ201に戻り、以降の処理を繰り返す。一方、バッファメモリ23に50パケット分格納されれば、USBオーディオクラスドライバ(上位ドライバ)24は、該50パケット分のオーディオデータをバッファメモリから読み取り、アプリケーション部25を介してDSP用バッファ26に保存し、始めに戻る。なお、DSP 27の処理は図5にしたがって説明する。
(C) Sample Rate Change Process FIG. 4 is a sample rate change process flow of the host unit 20. Note that the host controller driver 22 stores the sample rate of the currently playing song in a built-in memory.
The application unit 25 of the host unit 20 monitors whether or not the sample rate change notification has been received from the device 10 (step 201). If the sample rate change notification is not received, the host controller driver 22 periodically checks, for example, every 1 msec. The packet request is transmitted to the device 10 (step 202), and a rate identifier representing the sample rate is added to the head of the audio packet received from the device 10 and stored in the buffer memory 23 (step 203). Next, it is checked whether 50 packets have been stored in the buffer memory 23 (step 204). If not, the process returns to step 201 and the subsequent processing is repeated. On the other hand, if 50 packets are stored in the buffer memory 23, the USB audio class driver (upper driver) 24 reads the audio data for 50 packets from the buffer memory and saves it in the DSP buffer 26 via the application unit 25. And go back to the beginning. The processing of the DSP 27 will be described with reference to FIG.

一方、ステップ201において、アプリケーション部25はデバイス10からサンプルレート変更通知を受信すれば、直ちにホストコントローラドライバ22にサンプルレートの変更を指示する。ホストコントローラドライバ22は新サンプルレートを内蔵のメモリ内に記憶し、デバイス10にサンプルレートの変更受信応答を通知する(ステップ206)。
以後、ホストコントローラドライバ22は、定期的に、例えば1msec毎にパケットリクエストをデバイス10に送信し(ステップ202)、デバイス10から受信したオーディオパケットの先頭に新サンプルレートを表すレート識別子を加えてバッファメモリ23に格納する(ステップ203)。図1のバッファメモリ23にはサンプルレート44.1kHzの曲Aのオーディオパケットからサンプルレート48kHzの曲Bのオーディオパケットが保存された場合が示されている。
On the other hand, when the application unit 25 receives a sample rate change notification from the device 10 in step 201, it immediately instructs the host controller driver 22 to change the sample rate. The host controller driver 22 stores the new sample rate in the built-in memory, and notifies the device 10 of a sample rate change reception response (step 206).
Thereafter, the host controller driver 22 periodically transmits a packet request to the device 10 every 1 msec, for example (step 202), and adds a rate identifier representing a new sample rate to the head of the audio packet received from the device 10 and buffers it. Store in the memory 23 (step 203). The buffer memory 23 of FIG. 1 shows a case where an audio packet of a song B having a sample rate of 48 kHz is stored from an audio packet of a song A having a sample rate of 44.1 kHz.

図5はDSP 27の処理フローである。DSP 27は順次DSP用バッファ26に保存されているオーディオパケットを読出し(ステップ301)、そのサンプルレートを識別し(ステップ302)、サンプルレート識別符号が指示するサンプルレートに基づいて該オーディオデータをアナログ信号に変換して出力する(ステップ303)。
以上の説明では全オーディオパケットにサンプルレート識別符号を付したが、サンプルレートが変化する曲の最初のパケットのみに付加するだけでも良い。
FIG. 5 is a processing flow of the DSP 27. The DSP 27 sequentially reads out the audio packets stored in the DSP buffer 26 (step 301), identifies the sample rate (step 302), and analogizes the audio data based on the sample rate indicated by the sample rate identification code. It converts into a signal and outputs (step 303).
In the above description, the sample rate identification code is attached to all audio packets. However, it may be added only to the first packet of a song whose sample rate changes.

以上、第1実施例によれば、下位ドライバで1パケットごとにレート識別子を付加することで、バッファメモリ内においてどのデータがどのサンプルレートなのか、DSPが知ることができ、正しくサンプルレートに基づいてオーディオ信号を再生できる。
また、第1実施例によれば、DSPがパケット単位でサンプルレートを知ることにより、バッファ内のデータを完全に再生し終えるのを待ったり、あるいはバッファ内のデータを破棄したりすることなく、瞬時にサンプルレートを変更することが可能になる。
また、第1実施例によれば、サンプルレートの変更にかかる時間を圧倒的に短くできるため、曲間の空白を殆ど無に近づけることができ、いわゆる「ギャップレス再生」に近い再生を行うことができる。
As described above, according to the first embodiment, by adding a rate identifier for each packet in the lower driver, the DSP can know which data is in which sample rate in the buffer memory, and correctly based on the sample rate. Audio signals can be played back.
In addition, according to the first embodiment, the DSP knows the sample rate in units of packets without waiting for the data in the buffer to be completely reproduced or without discarding the data in the buffer. It becomes possible to change the sample rate instantaneously.
Also, according to the first embodiment, the time required for changing the sample rate can be overwhelmingly shortened, so that the space between songs can be made almost non-existent, and reproduction close to so-called “gapless reproduction” can be performed. it can.

(B)第2実施例
図6は本発明の第2実施例のオーディオ装置の構成図であり、図1と同一部分には同一符号を付している。第2実施例において、第1実施例と異なる点は、第1実施例のバッファメモリ23とDSP用バッファ25をまとめて1つのメモリ51で構成している点である。
図7はメモリ51の動作説明図であり、AWは書き込みアドレス、ARは読出しアドレスである。メモリ51へのオーディオパケットの書き込みはホストコントローラドライバ22により行なわれ、メモリ51からのオーディオパケットの読み出しはDSP27により行なわれる。図7(A)に示すように、ホストコントローラドライバ22はオーディオパケットをメモリ51のアドレス0から点線矢印方向に順番にアドレスnまで書き込み、アドレスnまで書き込めば、以後、再びアドレス0から順番に上書きする。最初、メモリ51にオーディオパケットが保存されていない状態において、ホストコントローラドライバ22はメモリ51に最初の曲のオーディオパケットを数百msec分記憶する。例えばアドレスmまでオーディオパケットを記憶する(図7(A)参照)。そして、アドレスmまでオーディオパケットを記憶した時点から、図7(B)に示すように、DSP 27はアドレス0から矢印方向にオーディオパケットの読み出しを開始し、また、ホストコントローラドライバ22はアドレス(m+1)からオーディオパケットの書き込みを継続する。以後、オーディオパケットの書き込みと読み出しを並行して行なう。
(B) Second Embodiment FIG. 6 is a block diagram of an audio apparatus according to a second embodiment of the present invention. Components identical with those shown in FIG. The second embodiment is different from the first embodiment in that the buffer memory 23 and the DSP buffer 25 of the first embodiment are combined into a single memory 51.
FIG. 7 is an explanatory diagram of the operation of the memory 51, where AW is a write address and AR is a read address. Audio packet writing to the memory 51 is performed by the host controller driver 22, and audio packet reading from the memory 51 is performed by the DSP 27. As shown in FIG. 7A, the host controller driver 22 writes the audio packets in the direction of the dotted line arrow from the address 0 of the memory 51 to the address n in order, and writes to the address n. To do. Initially, in a state where no audio packet is stored in the memory 51, the host controller driver 22 stores the audio packet of the first song for several hundreds msec in the memory 51. For example, audio packets are stored up to address m (see FIG. 7A). When the audio packet is stored up to the address m, the DSP 27 starts reading the audio packet in the arrow direction from the address 0 as shown in FIG. 7B, and the host controller driver 22 reads the address (m + 1). ) Continue to write audio packets. Thereafter, the audio packet is written and read in parallel.

図8はホストユニット20の第2実施例のサンプルレート変更処理フローである。
ホストユニット20のアプリケーション部25はデバイス10からサンプルレート変更通知を受信したか監視しており(ステップ401)、サンプルレート変更通知を受信しなければ、ホストコントローラドライバ22は定期的に、例えば1msec毎にパケットリクエストをデバイス10に送信し(ステップ402)、デバイス10から受信したオーディオパケットをメモリ51に格納し(ステップ403)、ステップ401に戻る。
FIG. 8 shows a sample rate change processing flow of the host unit 20 according to the second embodiment.
The application unit 25 of the host unit 20 monitors whether or not a sample rate change notification has been received from the device 10 (step 401). If no sample rate change notification is received, the host controller driver 22 periodically checks, for example, every 1 msec. The packet request is transmitted to the device 10 (step 402), the audio packet received from the device 10 is stored in the memory 51 (step 403), and the process returns to step 401.

一方、ステップ401において、アプリケーション部25はデバイス10からサンプルレート変更通知を受信すれば(図6の(1))、直ちにホストコントローラドライバ22にサンプルレートの変更を指示する(図6の(2))。ホストコントローラドライバ22は新サンプルレートを内蔵のメモリ内に記憶し、デバイス10にサンプルレート変更の受信応答をする((図6の(3))、ステップ404)。
以後、ホストコントローラドライバ22は、定期的に、例えば1msec毎にパケットリクエストをデバイス10に送信する(ステップ405)。そして、ホストコントローラドライバ22は、デバイス10から新サンプルレートの最初のオーディオパケットを受信すれば、該オーディオパケットをメモリ51のアドレスAsc(図7(C)参照)に格納すると共に、該メモリアドレスAsc(レート変更点という)をレート変更点情報として上位ドライバ24に渡す((図6の(4))、ステップ406)。上位ドライバ24は該レート変更点情報をアプリケーション部25に渡し(図6の(5))、アプリケーション部25はDSP27にレート変更点と新サンプルレートを通知する((図6の(6))、ステップ407)。以後、ステップ401以降の処理が行なわれる。
On the other hand, in step 401, when the application unit 25 receives the sample rate change notification from the device 10 ((1) in FIG. 6), it immediately instructs the host controller driver 22 to change the sample rate ((2) in FIG. 6). ). The host controller driver 22 stores the new sample rate in the built-in memory, and makes a reception response for changing the sample rate to the device 10 ((3) in FIG. 6, step 404).
Thereafter, the host controller driver 22 transmits a packet request to the device 10 periodically, for example, every 1 msec (step 405). When the host controller driver 22 receives the first audio packet at the new sample rate from the device 10, the host controller driver 22 stores the audio packet at the address Asc (see FIG. 7C) of the memory 51, and at the memory address Asc. (Referred to as “rate change point”) is passed to the upper driver 24 as rate change point information ((4) in FIG. 6, step 406). The host driver 24 passes the rate change point information to the application unit 25 ((5) in FIG. 6), and the application unit 25 notifies the DSP 27 of the rate change point and the new sample rate ((6) in FIG. 6). Step 407). Thereafter, the processing after step 401 is performed.

図9はDSP 27の処理フローである。なお、DSP27は現在再生中の曲のサンプルレート(第1のサンプルレートという)を保持している。
DSP 27はアプリケーション部25からレート変更点とサンプルレートを受信したか監視し(ステップ501)、受信しなければ、メモリ51の読出しアドレスARがレート変更点アドレスAscと一致するかチェックする(ステップ502)。この時点ではまだアプリケーション部25よりレート変更点を通知されていないから、DSP27はレート変更点アドレスAscを保持しておらず、読出しアドレスARはレート変更点アドレスAscと一致しないと判定する。
ついで、DSP27は読出しアドレスARが指示する記憶域からパケットデータを読み出し(ステップ503)、かつ、読出しアドレスARを次の読出しアドレスに更新する(ステップ504)。しかる後、DSP27は読み出したオーディオパケットを構成するオーディオデータを第1のサンプルレートに基づいてアナログ信号に変換して出力し(ステップ505)、始めに戻る。
FIG. 9 is a processing flow of the DSP 27. Note that the DSP 27 holds the sample rate (referred to as the first sample rate) of the currently reproduced song.
The DSP 27 monitors whether the rate change point and the sample rate have been received from the application unit 25 (step 501). If not received, the DSP 27 checks whether the read address AR of the memory 51 matches the rate change point address Asc (step 502). ). At this time, the rate change point has not been notified from the application unit 25, so the DSP 27 does not hold the rate change point address Asc, and determines that the read address AR does not match the rate change point address Asc.
Next, the DSP 27 reads the packet data from the storage area indicated by the read address AR (step 503), and updates the read address AR to the next read address (step 504). Thereafter, the DSP 27 converts the audio data constituting the read audio packet into an analog signal based on the first sample rate and outputs it (step 505), and returns to the beginning.

一方、ステップ501において、DSP 27はアプリケーション部25からレート変更点とサンプルレートを受信すれば、レート変更点Ascを保存すると共に、サンプルレートを第2のサンプルレートとして内蔵のメモリに記憶し(ステップ506)、以後ステップ502の処理を行なう。
ステップ502において、読出しアドレスARがレート変更点Ascと一致すれば、第2サンプルレートを第1サンプルレートに変更すると共に、レート変更点Ascをクリアし(ステップ507)、ステップ503以降の処理を繰り返す。これにより、以後、DSP27は読み出したオーディオパケットを構成するオーディオデータを新サンプルレートに基づいてアナログ信号に変換して出力する。
第2実施例によれば、第1実施例と同様の効果を奏することができると共に、第1実施例のようにサンプルレート識別符号をパケットに付加してバッファメモリに記憶する必要がないためメモリ使用量を減少できる利点がある。
On the other hand, in step 501, if the DSP 27 receives the rate change point and the sample rate from the application unit 25, the DSP 27 saves the rate change point Asc and stores the sample rate as a second sample rate in the built-in memory (step 501). 506) Thereafter, the process of step 502 is performed.
In step 502, if the read address AR matches the rate change point Asc, the second sample rate is changed to the first sample rate, the rate change point Asc is cleared (step 507), and the processing from step 503 onward is repeated. . Thereby, the DSP 27 thereafter converts the audio data constituting the read audio packet into an analog signal based on the new sample rate and outputs the analog signal.
According to the second embodiment, the same effect as that of the first embodiment can be obtained, and it is not necessary to add the sample rate identification code to the packet and store it in the buffer memory as in the first embodiment. There is an advantage that the amount used can be reduced.

本発明の第1実施例のオーディオ装置の構成図である。It is a block diagram of the audio apparatus of 1st Example of this invention. デバイスの詳細構成図である。It is a detailed block diagram of a device. 処理部のサンプルレート通知処理フローである。It is a sample rate notification processing flow of a processing unit. ホストユニットのサンプルレート変更処理フローである。It is a sample rate change processing flow of a host unit. DSP の処理フローである。This is the DSP processing flow. 本発明の第2実施例のオーディオ装置の構成図である。It is a block diagram of the audio apparatus of 2nd Example of this invention. 第2実施例のバッファメモリの説明図である。It is explanatory drawing of the buffer memory of 2nd Example. ホストユニットの第2実施例のサンプルレート変更処理フローである。It is a sample rate change process flow of 2nd Example of a host unit. 第2実施例のDSP の処理フローである。It is a processing flow of DSP of the second embodiment. 従来のオーディオシステムの構成図である。It is a block diagram of the conventional audio system. サンプルレート変更方法の説明図である。It is explanatory drawing of the sample rate change method.

符号の説明Explanation of symbols

10 デバイス(USB function)
20 ホストユニット(USB host)
30 USBバス
11 曲記憶部
12 処理部
21 USBインターフェース
22 ホストコントローラドライバ(下位ドライバ)
23 バッファメモリ
24 USBオーディオクラスドライバ(上位ドライバ)
25 アプリケーション部
26 DSP用バッファ
27 DSP
10 devices (USB function)
20 Host unit (USB host)
30 USB bus 11 Music storage unit 12 Processing unit 21 USB interface 22 Host controller driver (lower driver)
23 Buffer memory 24 USB audio class driver (upper driver)
25 Application section 26 DSP buffer 27 DSP

Claims (6)

ディジタルデータストリームを送信するデバイスと、該ディジタルデータストリームを受信してアナログ信号を再生するホストユニットと、前記デバイスとホストユニット間を双方向にデータ送受可能に接続するバスを備えたディジタルオーディオ装置において、
前記デバイスは、
サンプルレートの異なる複数の曲のオーディオデータを記憶する曲記憶部、
それまでと異なるサンプルレートの曲のオーディオデータの送信に先立ってホストユニットに新サンプルレートを通知すると共に、前記オーディオデータをホストユニットに送信する制御を行う制御部を備え、
ホストユニットは、
前記デバイスから受信するオーディオデータを保存するオーディオデータ保存部、
前記通知されたサンプルレートを識別するための識別符号を、前記デバイスから受信するオーディオデータに付加して前記オーディオデータ保存部に保存する制御部、
前記オーディオデータ保存部からオーディオデータを保存順に読み出し、該オーディオデータに付加されているサンプルレート識別符号が指示するサンプルレートに基づいて該オーディオデータをアナログ信号に変換するアナログ信号再生部、
を備えたことを特徴とするディジタルオーディオ装置。
In a digital audio apparatus comprising a device that transmits a digital data stream, a host unit that receives the digital data stream and reproduces an analog signal, and a bus that connects the device and the host unit so that data can be transmitted and received bidirectionally ,
The device is
A song storage unit for storing audio data of a plurality of songs having different sample rates;
Prior to transmission of audio data of a song with a different sample rate than before, a new sample rate is notified to the host unit, and a control unit for performing control to transmit the audio data to the host unit is provided.
The host unit
An audio data storage unit for storing audio data received from the device;
A control unit for adding an identification code for identifying the notified sample rate to the audio data received from the device and storing it in the audio data storage unit;
An analog signal reproduction unit that reads audio data from the audio data storage unit in the order of storage and converts the audio data into an analog signal based on a sample rate indicated by a sample rate identification code added to the audio data;
A digital audio apparatus comprising:
前記デバイスはホストユニットへオーディオデータをパケット単位で送信し、
前記ホストユニットの制御部は該パケットにサンプルレート識別符号を付加して前記オーディオデータ保存部に保存し、
前記アナログ信号再生部は保存順にパケットをオーディオデータ保存部から読出し、該パケットに付加されているサンプルレート識別符号が指示するサンプルレートに基づいて該パケットを構成するオーディオデータをアナログ信号に変換する、
ことを特徴とする請求項1記載のディジタルオーディオ装置。
The device sends audio data to the host unit in packets,
The control unit of the host unit adds a sample rate identification code to the packet and stores it in the audio data storage unit,
The analog signal reproduction unit reads out packets from the audio data storage unit in the order of storage, and converts the audio data constituting the packet into an analog signal based on the sample rate indicated by the sample rate identification code added to the packet.
2. The digital audio apparatus according to claim 1, wherein
ディジタルデータストリームを送信するデバイスと、該ディジタルデータストリームを受信してアナログ信号を再生するホストユニットと、前記デバイスとホストユニット間を双方向にデータ送受可能に接続するバスを備えたディジタルオーディオ装置において、
前記デバイスは、
サンプルレートの異なる複数の曲のオーディオデータを記憶する曲記憶部、
それまでと異なるサンプルレートの曲のオーディオデータの送信に先立ってホストユニットに新サンプルレートを通知すると共に、前記オーディオデータをホストユニットに送信する制御を行う制御部を備え、
ホストユニットは、
前記デバイスから受信するオーディオデータを保存するオーディオデータ保存部、
前記オーディオデータ保存部からオーディオデータを保存順に読み出し、該オーディオデータをアナログ信号に変換するアナログ信号再生部、
前記デバイスから受信するオーディオデータをオーディオデータ保存部に保存すると共に、前記通知された新サンプルレートと該新サンプルレートのオーディオデータの記憶開始位置を前記アナログ信号再生部に通知する制御部、
を備え、前記アナログ信号再生部はオーディオデータ読出し位置が前記通知された記憶開始位置になったときサンプルレートを前記通知されている新サンプルレートに切り替えてオーディオデータをアナログ信号に変換する、
ことを特徴とするディジタルオーディオ装置。
In a digital audio apparatus comprising a device that transmits a digital data stream, a host unit that receives the digital data stream and reproduces an analog signal, and a bus that connects the device and the host unit so that data can be transmitted and received bidirectionally ,
The device is
A song storage unit for storing audio data of a plurality of songs having different sample rates;
Prior to transmission of audio data of a song with a different sample rate than before, a new sample rate is notified to the host unit, and a control unit for performing control to transmit the audio data to the host unit is provided.
The host unit
An audio data storage unit for storing audio data received from the device;
An analog signal reproduction unit that reads audio data from the audio data storage unit in the order of storage and converts the audio data into an analog signal;
A controller that stores audio data received from the device in an audio data storage unit, and notifies the analog signal reproduction unit of the notified new sample rate and a storage start position of the audio data of the new sample rate;
The analog signal reproduction unit converts the audio data into an analog signal by switching the sample rate to the notified new sample rate when the audio data read position is the notified storage start position.
A digital audio apparatus characterized by the above.
前記デバイスはホストユニットへオーディオデータをパケット単位で送信し、
前記ホストユニットの制御部は前記新サンプルレートと該新サンプルレートのパケットの記憶開始位置を前記アナログ信号再生部に通知し、
前記アナログ信号再生部はパケット読出し位置が前記通知された記憶開始位置になったときサンプルレートを前記通知されている新サンプルレートに切り替えてパケットを構成するオーディオデータをアナログ信号に変換する、
ことを特徴とする請求項3記載のディジタルオーディオ装置。
The device sends audio data to the host unit in packets,
The control unit of the host unit notifies the analog signal reproduction unit of the new sample rate and the storage start position of the packet of the new sample rate,
The analog signal reproduction unit converts the audio data constituting the packet into an analog signal by switching the sample rate to the notified new sample rate when the packet reading position becomes the notified storage start position,
4. The digital audio apparatus according to claim 3, wherein
ディジタルデータストリームを送信するデバイスと、該ディジタルデータストリームを受信してアナログ信号を再生するホストユニットと、前記デバイスとホストユニット間を双方向にデータ送受可能に接続するバスを備えたディジタルオーディオ装置のサンプルレート切り替え方法において、
前記デバイスは、それまでと異なるサンプルレートの曲のオーディオデータの送信に先立ってホストユニットに新サンプルレートを通知し、
前記ホストユニットは、前記通知されたサンプルレートを識別するための識別符号を、前記デバイスから受信するオーディオデータに付加してオーディオデータ保存部に保存し、
再生に際して、前記オーディオデータ保存部からオーディオデータを保存順に読み出し、該オーディオデータに付加されているサンプルレート識別符号が指示するサンプルレートに基づいて該オーディオデータをアナログ信号に変換する、
ことを特徴とするサンプルレート切り替え方法。
A digital audio apparatus comprising: a device that transmits a digital data stream; a host unit that receives the digital data stream and reproduces an analog signal; and a bus that connects the device and the host unit so that data can be transmitted and received bidirectionally. In the sample rate switching method,
The device notifies the host unit of the new sample rate prior to transmitting the audio data of the song with a different sample rate,
The host unit adds an identification code for identifying the notified sample rate to the audio data received from the device and stores it in an audio data storage unit,
Upon reproduction, the audio data is read from the audio data storage unit in the order of storage, and the audio data is converted into an analog signal based on the sample rate indicated by the sample rate identification code added to the audio data.
A sample rate switching method characterized by that.
ディジタルデータストリームを送信するデバイスと、該ディジタルデータストリームを受信してアナログ信号を再生するホストユニットと、前記デバイスとホストユニット間を双方向にデータ送受可能に接続するバスを備えたディジタルオーディオ装置のサンプルレート切り替え方法において、
前記デバイスは、それまでと異なるサンプルレートの曲のオーディオデータの送信に先立ってホストユニットに新サンプルレートを通知し、
前記ホストユニットの制御部は、前記デバイスから受信するオーディオデータをオーディオデータ保存部に記憶すると共に、前記通知された新サンプルレートと該新サンプルレートのオーディオデータの記憶開始位置をアナログ信号再生部に通知し、
アナログ信号再生部は、前記オーディオデータ保存部からオーディオデータを保存順に読み出し、オーディオデータ読出し位置が前記通知された記憶開始位置になったときサンプルレートを前記通知されている新サンプルレートに切り替えてオーディオデータをアナログ信号に変換する、
ことを特徴とするサンプルレート切り替え方法。
A digital audio apparatus comprising: a device that transmits a digital data stream; a host unit that receives the digital data stream and reproduces an analog signal; and a bus that connects the device and the host unit so that data can be transmitted and received bidirectionally. In the sample rate switching method,
The device notifies the host unit of the new sample rate prior to transmitting the audio data of the song with a different sample rate,
The control unit of the host unit stores the audio data received from the device in an audio data storage unit, and stores the notified new sample rate and the storage start position of the audio data of the new sample rate in the analog signal reproduction unit. Notify
The analog signal reproduction unit reads the audio data from the audio data storage unit in the order of storage, and switches the sample rate to the notified new sample rate when the audio data read position reaches the notified storage start position. Convert data into analog signals,
A sample rate switching method characterized by that.
JP2006323207A 2006-11-30 2006-11-30 Digital audio device and its sample rate changing method Withdrawn JP2008140434A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006323207A JP2008140434A (en) 2006-11-30 2006-11-30 Digital audio device and its sample rate changing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006323207A JP2008140434A (en) 2006-11-30 2006-11-30 Digital audio device and its sample rate changing method

Publications (1)

Publication Number Publication Date
JP2008140434A true JP2008140434A (en) 2008-06-19

Family

ID=39601743

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006323207A Withdrawn JP2008140434A (en) 2006-11-30 2006-11-30 Digital audio device and its sample rate changing method

Country Status (1)

Country Link
JP (1) JP2008140434A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016174276A (en) * 2015-03-17 2016-09-29 オンキヨー株式会社 Music reproduction device and music reproduction program
CN114783452A (en) * 2022-06-17 2022-07-22 荣耀终端有限公司 Audio playing method, device and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016174276A (en) * 2015-03-17 2016-09-29 オンキヨー株式会社 Music reproduction device and music reproduction program
CN114783452A (en) * 2022-06-17 2022-07-22 荣耀终端有限公司 Audio playing method, device and storage medium

Similar Documents

Publication Publication Date Title
US20070050479A1 (en) Content receiving apparatus and content receiving method
EP1724989A1 (en) Content reproducing device and content reproducing method
JP6582589B2 (en) Audio equipment
US10200962B2 (en) Audio device, audio system, and synchronous reproduction method
JP2005084459A (en) Audio device and reproducing method of audio device
JP2003330496A (en) Method and apparatus for controlling buffering of audio stream
JP2008140434A (en) Digital audio device and its sample rate changing method
JP5532638B2 (en) Data distribution system
JP2009277277A (en) Speech processing unit
JPH10143350A (en) First-in first-out memory control system
JPH11149706A (en) Recording reproducer and recording reproduction method
WO2005104125A1 (en) Record reproducing device, simultaneous record reproduction control method and simultaneous record reproduction control program
JP2009180972A (en) Audio resume reproduction device and audio resume reproduction method
JP5751406B2 (en) Video server apparatus and material continuous reproduction method in video server
JP4356225B2 (en) Information providing method, information providing apparatus, and information recording medium
JP4521336B2 (en) Video server system
JP6005910B2 (en) Sound equipment
JP4211928B2 (en) COMMUNICATION MODULE, REPRODUCTION DEVICE HAVING THE SAME, NAVIGATION DEVICE, AND DISPLAY DEVICE
US20030058560A1 (en) Apparatus and method for processing content information capable of time-divisionally carrying out recording and reproducing operations
WO2012056699A1 (en) Data reproduction device
KR101619878B1 (en) Apparatus for playing dsd audio file using i2s transmission scheme and method thereof
JP4187896B2 (en) Voice information transmitting apparatus and voice information communication system
JP4385710B2 (en) Audio signal processing apparatus and audio signal processing method
JP2003125018A (en) Transmission system, data transmitter, data receiver, data-transmitting method and data-receiving method
JP2003308643A (en) Sound recording and reproducing device using writable and readable storage medium

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20100202