Coder Social home page Coder Social logo

rawheadrex / netcoreaudio Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mobiletechtracker/netcoreaudio

0.0 0.0 0.0 30 KB

Allows playback of audio files on .NET Core with minimal dependencies

License: MIT License

C# 97.14% Dockerfile 2.86%

netcoreaudio's Introduction

NetCoreAudio

The library allows playback of audio files on .NET Core on any operating system with minimal dependencies

Usage

The library exposes Player class, which detects the OS the library is running on and abstracts away any OS-specific audio playback implementations.

Properties

bool Playing

Indicates that the audio is currently playing.

bool Paused

Indicates that the audio playback is currently paused.

Methods

Play(string fileName)

Will stop any current playback and will start playing the specified audio file. The fileName parameter can be an absolute path or a path relative to the directory where the library is located. Sets Playing flag to true. Sets Paused flag to false.

Pause()

Pauses any ongoing playback. Sets Paused flag to true. Doesn't modify Playing flag.

Resume()

Resumes any paused playback. Sets Paused flag to false. Doesn't modify Playing flag.

Stop()

Stops any current playback and clears the buffer. Sets Playing and Paused flags to false.

Stopped playback cannot be resumed. If the same file needs to be played again, it can only be played from the beginning.

Events

EventHandler PlaybackFinished

Internally, sets Playing flag to false. Additional handlers can be attached to it to handle any custom logic.

netcoreaudio's People

Contributors

fiodarsazanavets avatar cmjchrisjones avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.