1. Field of the Invention
The present invention relates to a recording/reproduction apparatus for reproducing audio data, and at the same time, compression-encoding and recording the audio data.
2. Description of the Related Art
In recent years, there are well-known recording/reproduction apparatuses for reading and reproducing audio data recorded on CDs (Compact Discs) or the like, and at the same time, saving encoded data which is obtained by compression encoding using an algorithm, such as MP3 (MPEG-1 Audio Layer-3), AAC (Advanced Audio Coding) or the like, into a semiconductor memory or a hard disk.
According to a certain conventional technique, a plurality of songs having different song numbers in a live CD on which no silent time is present between each song are continuously compression-encoded and recorded into a single music file, while information about the starting locations of the songs is recorded into another file. When a song number is specified and reproduced, reproduction is started from the specified song in the music file with reference to the location information file (see Japanese Unexamined Patent Application Publication No. 2004-93729).
However, there is still a users' strong demand for dividing encoded data into song numbers, which are in turn recorded.
According to the MP3 format, audio data is encoded in units of a frame which includes a predetermined number of samples, into MP3 data composed of a header and main data. Due to the structure of MP3, the main data of a frame may be mixed into the previous frame. Therefore, for example, if song numbers are changed at a boundary between frames of audio data, then when these frames are successively encoded, data of the succeeding frame is mixed into data of the preceding frame, so that MP3 data may not be divided into song numbers. To solve this problem, it may be contemplated that the leading frame of a song immediately after changing is encoded twice. However, when songs are changed, the processing load temporarily increases, likely leading to underflow of an output buffer for reproduction, which interrupts reproduction.
In view of the above-described problems, the present invention has been achieved. An object of the present invention is to provide a recording/reproduction apparatus for performing recording and reproduction simultaneously, in which, even when audio data including different song numbers is continuously input, encoded data is divided into song numbers and recorded without interruption of reproduction.
To achieve the object, a recording/reproduction according to the present invention comprises a control section for reading audio data in units of a predetermined number of samples and outputting the audio data, a buffer for temporarily storing audio data from the control section, a decoder section for performing a decoding process so as to reproduce audio data in the buffer, an output buffer for temporarily storing decoded data from the decoder section and outputting the decoded data at a predetermined rate, an encoder section for performing an encoding process so as to record audio data in the buffer, an encoded data buffer for temporarily storing encoded data from the encoder section and outputting the encoded data, a song change detecting section for reading song location information corresponding to audio data read by the control section, determining whether the audio data is located midway through a song or at a boundary between songs based on the song location information, and notifying the result, and a frame boundary division section for performing no process when a notification from the song change detecting section indicates that the audio data is located midway through a song, and performing a process of dividing encoded data in the encoded data buffer when the notification indicates that the audio data is located at a boundary between songs, and notifying the outside of a division location of the encoded data.
According to the present invention, even when audio data including different song numbers is continuously input, encoded data can be divided into song numbers and recorded. In addition, the process of dividing encoded data at frame boundaries can be executed relatively quickly. Therefore, it is possible to prevent underflow of an output buffer for reproduction due to a temporary increase in processing load when songs are changed.
Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings.
On CDs, a subcode including a song number or the like is recorded every a predetermined number of samples (e.g., 588 samples) in audio data. The song change detecting section 106 can utilize the subcode as a kind of song location information. The number of samples, the data size, the reproduction time of a song or the like of audio data can be used as song location information.
The song change detecting section 106 reads song location information corresponding to audio data read by the control section 102, and based on the song location information, determines whether the audio data is located midway through a song or at a boundary between songs, and notifies the frame boundary division section 110 of the result.
When the notification from the song change detecting section 106 indicates that the audio data is located midway through a song, the frame boundary division section 110 performs no process. When the notification from the song change detecting section 106 indicates that the audio data is located at a boundary between songs, the frame boundary division section 110 writes dummy data into the encoded data buffer 109 so as to divide encoded data at a frame boundary, and notifies the outside of the division location.
According to the MP3 format, as described above, audio data is encoded in units of a frame which includes a predetermined number of samples, into MP3 data composed of a header and main data. As shown in
A process in the song change detecting section 106 will be described in detail with reference to
Initially, when a frame 0 of audio data is read by the control section 102, the song change detecting section 106 reads a subcode corresponding to the frame 0 of audio data. The frame 0 of audio data is data which is first input after activation of the recording/reproduction apparatus 101, so that a song number M of the frame 0 is set as an initial song number. Thereafter, every time the control section 102 reads each of frames 1 to N of audio data, the song change detecting section 106 reads a subcode corresponding to the audio data to determine a song number. Since the song numbers of the frames 0 to N of audio data are M, the song change detecting section 106 determines that the frames 0 to N are located midway through a song.
When the control section 102 reads a frame (N+1) of audio data, the song change detecting section 106 reads a subcode corresponding to the frame (N+1) of audio data. Since the frame (N+1) of audio data has a song number M+1, the song change detecting section 106 determines that the frame (N+1) is located at a boundary between songs.
Next, a process in the frame boundary division section 110 will be described in detail with reference to
As described above, according to the recording/reproduction apparatus 101 of
When a song number M is changed to a song number M+1 midway through a frame N of audio data as shown in
It is apparent from the data structure of
As shown in
The song change detecting section 106 may utilize the number of samples, the data size, the reproduction time of a song or the like of audio data as song location information, monitor audio data read by the control section 102, and determine whether the audio data is located midway through a song or at a boundary between songs based on the song location information. For example, when the number of samples is used as song location information, the song change detecting section 106 monitors the number of samples in audio data read by the control section 102, and notifies that the audio data is located midway through a song when the number of samples in the read audio data is not equal to the number of samples in the externally specified song location information, and notifies that the audio data is located at a boundary between songs when the two sample numbers are equal to each other.
Although it has been assumed above that the compression-encoding format of the encoder section 105 is MP3, the present invention is also applicable to an arrangement in which encoded data is extended over a plurality of frames, e.g., AAC SBR (Spectral Band Replication), and a similar effect is obtained.
As described above, the recording/reproduction apparatus of the present invention is effective when encoded data is divided into song numbers and recorded simultaneously with reproduction while audio data including different song numbers is input.
Number | Date | Country | Kind |
---|---|---|---|
2006-338282 | Dec 2006 | JP | national |