/* * Copyright (C) 2002 Philip Blundell * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ #include #include #include int sound_device_open (int mode) { int rate = 16000; if (mode == O_RDONLY) return esd_record_stream_fallback (ESD_BITS16 | ESD_STEREO | ESD_STREAM | ESD_RECORD, rate, NULL, NULL); if (mode == O_WRONLY) return esd_play_stream_fallback (ESD_BITS16 | ESD_STEREO | ESD_STREAM | ESD_PLAY, rate, NULL, NULL); return -1; }