As for my device, whenever I play Duolingo and music at the same time, then the audio fades slightly with CM 12 built-in player

Now if you are OK with any third-party application, here is what you need to do. 

1. Install and open [Poweramp Music Player][1]
2. Go to Settings
3. Then click on Audio
4. Select Audio Focus
5. Uncheck Short Audio Focus Change
 
 <sub>(Click image to enlarge)</sub>

 [<img src="https://i.sstatic.net/XXCmWl.png" width="210" height="350" alt="IMG: Here is the screenshot" title="">][2]

  [1]: https://play.google.com/store/apps/details?id=com.maxmpz.audioplayer
  [2]: https://i.sstatic.net/XXCmW.png