# Playing back a simple stream

After you've converted your data and created a stream file, you are ready to play it. The Streaming and Attic folders contain a variety of examples that you can use or modify to play a stream file with your own data.

This section first lists available example applications, then looks in some more detail at special considerations for certain kinds of data.

## Playback example applications

The following table lists example applications you can use to stream different kinds of data. You can examine them to better understand data streaming and modify them to suit your own data.

    Table 1:  Playback example applications.
    ---------------------------------------------------------
    Example   |Description                    |Location
    ---------------------------------------------------------
    NuPlayer  |High level Cinepak movie       |DataStreaming:
              |playback.                      |version:Exampl
              |                               |es
    ---------------------------------------------------------
    PlaySAnim |Example of a multi-channel     |DataStreaming:
              |streamed animation file player.|version:Exampl
              |                               |es
    ---------------------------------------------------------
    SCelPlayer|Plays woven data streams       |Attic
              |containing SCEL-chunk data.    |
    ---------------------------------------------------------
    PlaySA    |Plays streamed audio. It's     |DataStreaming:
              |possible to have different     |version:Exampl
              |audio in different channels.   |es
    ---------------------------------------------------------
    TextPlayer|Plays a text stream.           |Attic
    ---------------------------------------------------------

For each example application, your own program should call the appropriate initialization and rendering functions to play back the data.

### Example: Streaming compressed video to cels

If you decide to use the NuPlayer application to draw streamed video to different small cel regions on screen, you need to call the following functions in NuPlayer.c:

- `InitCPackCel()` performs setup and initializes several channels, each with its own context structure. It also initializes frame timing information for a particular channel.

- `GetCPackCel()` and `DrawCPakToBuffer()` actually draw the video to the screen.

## Special considerations for different types of data

For each type of data (video, text, and so on) you want to stream to the 3DO Station, your program needs to make the appropriate subscriber available. The following table provides an overview of different types of data, available chunk types, and the subscriber used to play it.

    Table 2:  Available data types, chunk types and subscribers.
    ------------------------------------------------------
    Type of    |Chunk type             |Subscriber
    data       |                       |
    ------------------------------------------------------
    video      |CPAK                   |CPakSubscriber
    ------------------------------------------------------
    cel/anim   |SCEL                   |SCel subscriber
    ------------------------------------------------------
    cel/anim   |SANM                   |SAnimSubscriber
    ------------------------------------------------------
    AIFF file  |SSND                   |SAudio subscriber
    ------------------------------------------------------
    text       |TEXT                   |Text subscriber
    ------------------------------------------------------
    any data   |JOIN                   |Join subscriber
    ------------------------------------------------------
               |GOTO, ALRM, PAUS, STOP,|Control subscriber
               |SYNC                   |
    ------------------------------------------------------

Note: A subscriber for playing MIDI score files is planned for the future. Check the 3DO Release Notes for more information.

### Where to find subscriber examples

The subscribers listed in in the table above are either in the Streaming folder or in the Attic folder on the 3DO Toolkit CD-ROM.